From Wikipedia, the free encyclopedia
|WikiProject Computer graphics||(Rated Stub-class)|
- Dare I ask why you want to use this format? — Smjg (talk) 12:22, 29 September 2011 (UTC)
- It's great for embedding shapes in C code. --188.8.131.52 (talk) 22:31, 30 March 2012 (UTC)
- If you look at XBM as an image format, it might look very clumbsy and inefficient. But if you see it as C code, that is about to be compiled, it is actually very efficient and lean. And it's easy to use... I mean you can generate that C code with a graphic program, and you can simply include it in a C program with
#include "circle.xbm"! 184.108.40.206 (talk) 09:48, 2 May 2012 (UTC)
I've probably only read 2 or 3 webpages about how the format works, but the examples they give use 6 bytes per byte of image data in the same way as here.
At the moment, I can only guess that:
- The space after the comma isn't required. But then why do the examples always include it? Just to exaggerate for effect how bad the format is?
- A byte can be represented with a single hex digit, as "0x6," which is two characters shorter than "0x06, ".
- However, it isn't legal to write the byte value as a C octal or decimal literal.
- In that case, surely byte values below 100 can be written in fewer bytes, and so the claim that each byte of image data takes up at least 4 bytes is false. Or are such values when written in decimal required to be space-padded, as "
6," or "
42,"? — Smjg (talk) 22:08, 30 November 2011 (UTC)
- They're not commonly written in decimal for XBM format, and probably some programs wouldn't be able to handle decimal numbers... AnonMoos (talk) 02:56, 1 December 2011 (UTC)