X BitMap
X BitMap
| Extension | .xbm |
|---|---|
| Type MIME | image/x-xbitmap |
| PUID | |
| Signature | 23 64 65 66 69 6E 65 20 (hexa) |
| Version initiale | |
| Type de format |
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 XBM (voir Media:Pointeur.xbm) :
#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) en pixels. Les deux lignes suivantes sont optionnelles et définissent la position d'un éventuel pixel de pointage dans l'image (coordonnée (0;0) 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, suivant l'organisation little-endian.
Ce format est avec GIF le premier à avoir été utilisable dans les pages web. Comme il est obsolète, son support est progressivement retiré des navigateurs Web.
Référence
Xlib - C Language X Interface, X Consortium Standard, X Version 11, Release 6.4, chapitre 16.9.
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.