| dbpprop:abstract
|
- In computer graphics, the X Window System uses X BitMap (XBM), an ASCII text monochrome image format, for storing cursor and icon bitmaps used in the X GUI. XBM files differ markedly from most image files in that they take the form of C source files. This means that they can be compiled directly into an application without any preprocessing steps, but it also makes them far larger than their raw pixel data would be (each byte of image data takes at least 5 bytes in a XBM file). XBM data typically appears in headers (. h files) and consist of a series of static unsigned char arrays containing the monochrome pixel data. They feature one array per image stored in the header. The following piece of C code exemplifies an XBM file: #define test_width 16 #define test_height 7 static char test_bits = { 0x13, 0x00, 0x15, 0x00, 0x93, 0xcd, 0x55, 0xa5, 0x93, 0xc5, 0x00, 0x80, 0x00, 0x60 }; The file defines a 16x7 bitmap. One can view it by opening a new text file, pasting in the C code above, naming it blarg. xbm, and then trying to view blarg. xbm either in an image viewer or via a web browser. In place of the usual image-file-format header, XBM files have two or four #define statements. The first two #defines specify the height and width of the bitmap in pixels. The second two, if they exist, specify the position of any hotspot within the bitmap. (Programmers use a hotspot within the image for bitmapped cursors to define where to position the "pointer" of the cursor, generally at 0,0. ) The image data consists of a line of pixel values stored in a static array. Because a single bit represents each pixel (black or white), each byte in the array contains the information for eight pixels, with the upper left pixel in the bitmap represented by the low bit of the first byte in the array. If the image width does not match a multiple of 8, the display mechanism ignores and discards the extra bits in the last byte of each row. Compare X PixMap A number of web browsers still offer support for displaying XBM images. This is a holdover from the early days of the WWW, when XBM was the minimal non-proprietary image file format. XBM support was removed from Internet Explorer 6, although it is still supported in Firefox and some other browsers, including Safari and Opera.
- X BitMap, abrégé XBM, est un format d'image numérique monochrome originellement conçu pour le système X Window, notamment pour les images de pointeur et d'icône. Le format XBM décrit les images en langage C, ce qui permet à un programmeur d'intégrer très facilement des images XBM à un logiciel écrit en C. L'image d'un pointeur est écrite comme suit au format XBM : Texte d'un pointeur au format XPM : define pointeur_width 11 define pointeur_height 16 define pointeur_x_hot 0 define pointeur_y_hot 0 static unsigned char pointeur_bits = { 0x01, 0x00, 0x03, 0x00, 0x07, 0x00, 0x0f, 0x00, 0x1f, 0x00, 0x3f, 0x00, 0x7f, 0x00, 0xff, 0x00, 0xff, 0x01, 0xff, 0x03, 0xff, 0x07, 0x3f, 0x00, 0x33, 0x00, 0x61, 0x00, 0x60, 0x00, 0xc0, 0x00 }; Les deux premières lignes définissent la largeur et la hauteur de l'image (11 par 16). Les deux lignes suivantes sont optionnelles et définissent la position d'un éventuel pixel de pointage dans l'image (coordonnée soit en haut à gauche au bout de la flèche). Les dernières lignes contiennent un tableau d'octets (ici représentés par le type unsigned char) dont les bits représentent les pixels de l'image. Ce format est avec GIF le premier à avoir été utilisable dans les pages web. Bien qu'il soit désormais obsolète, il est encore supporté par les navigateurs web, excepté Internet Explorer, duquel il a été enlevé.
- Een XBM of X-BitMap Graphic is een type computerafbeelding. Het bestandstype werd oorspronkelijk ontworpen voor gebruik in het X Window System om de iconen van het besturingssysteem mee weer te geven. Afbeeldingen in het XBM formaat zijn monochroom, een pixel is zwart of transparant. Om kleuren te kunnen toevoegen, is de afgeleide indeling van X-PixMap Graphic of XPM ontwikkeld. Bijzonder is, dat de informatie in het bestand wordt opgeslagen als ASCII tekst, met een teksteditor bewerkt kan worden, en zo een geïntegreerd deel kan uitmaken van de broncode van een programma dat is geschreven in bijvoorbeeld C of C++, dan wel een PHP-script of Javascript. Het eerste plaatje op het internet moet een XBM geweest zijn, of een GIF. Dat waren de types die de eerste Mosaic webbrowser kende. Mede omdat XBM geen datacompressie toepast, werden al gauw nieuwe en rechtenvrije standaarden zoals JPEG ontwikkeld om het web zijn kleur te geven. De meeste browsers begrijpen het (overigens nergens officieel vastgelegde) MIME-type "image/x-xbitmap" en kunnen de afbeeldingen weergeven. De ondersteuning is echter niet meer ingebouwd in Internet Explorer versie 6 of hoger. Er bestaan twee versies, X10 en sinds 1986 ook X11. Het verschil zit in de wijze waarop de pixelgegevens worden genoteerd. In X10 staan 16-bit WORDs, waar in X11 8-bit BYTEs geschreven worden. De schrijfwijze van X10 wordt beschouwd als verouderd.
- XBM eller X BitMap är ett bildfilformat som används på X Window System för svartvita bilder. Används för att spara pekargrafik och ikoner för X GUI. Den största egenheten hos XBM-filer är att de har samma form som en fil i C-kod och kan därför kompileras direkt utan ändringar. Detta är ett exempel på en XBM-fil: #define test_width 16 #define test_height 7 static char test_bits = { 0x13, 0x00, 0x15, 0x00, 0x93, 0xcd, 0x55, 0xa5, 0x93, 0xc5, 0x00, 0x80, 0x00, 0x60, }; Man kan titta på denna fil, som definierar en bitmap på 16x7 pixlar, genom att kopiera in ovanstående kod i en textfil, spara den till något med ". xbm" i slutet och sedan öppna den sparade filen i ett bildvisningsprogram eller en webbläsare.
|