Illtud Daniel on wrote...
| OK, one more stupid question:
|
| I want to output a bitonal bitmap. Nothing else, no header,
| one bit per pixel, so that a 80x256 pixel bitonal image produces
| a 2560-byte output.
|
| 'mono' format does exactly that, but the byte-ordering is
| lsb-first, whilst I want the reverse.
|
| ...and for bonus points I want to do it with perlmagick.
|
| I'm sure this is just my ignorance of available formats, or
| I'm missing imagetoblob parameters, but honestly I've tried
| my best and I can't get it.
|
You could try the PBM format, and delete the header.
A PBM file usally consists of one line (the P1 is files 'magic number')
P1 width height
Then binary raster, immedaitely following single white space character
after the height ascii number (usally a newline character).
* row by row from top to bottom
* Each row is width packed 8 to a byte, with donât care bits to fill out
the last byte in the row
* in order left to right most significant bit to least significate bit
* 1 = black 0 = white
It sound like just what you want, so just strip the first line and
you have your raw bitonal bitmap. If you want 0=black, -negate te image
before the save.
Anthony Thyssen ( System Programmer ) <[EMAIL PROTECTED]>
-----------------------------------------------------------------------------
Don't you just hate those long signature files? I mean, there oughta
be a law. If I were in control, .sigs would get cut off if they were
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users