Anton Feenstra on wrote...
| Hi,
|
|
| During recent cleaning action in my attic, I uncovered a stack of old
| floppies containing some old (late 80-ies) image files of sentimental
| value. These are written in a simple 'rgb 332' one byte per pixel format
| at 256x212 pixels (yes, that was state-of-the-art once!).
|
| I think convert should be able to read these, but I haven't been able to
| figure out the options. '-size 256x212 -depth 8 raw:file.pic' expects
| one byte per channel, so that won't work.
|
| Can ImageMagick read these files?
| If not, anybody know of a way to 'Make It So' (TM)?
|
| I thought to cook up a palette of 256 entries, but that is probably a
| bit of work (for me anyway) and seems quite dumb to me.
|
You could use a perl script to unpack the 332 format to a 888 three byte
format. Then IM will be able to read it, given the images width and
height.
Untested code.. (Need some test image to check it)
=======8<--------CUT HERE----------axes/crowbars permitted---------------
#!/usr/bin/perl
undef $/; # slurp in while file
print # print it
pack("c*, # repack as charcaters
map(( $_&&0xE0, ($_<<3)&&0xE0, ($_<<6)&&C0 ), # seperate colors
unpack("c*", <>) )); # read file and convert chars to ints
=======8<--------CUT HERE----------axes/crowbars permitted---------------
To use
script old_image > new_image
New image should be 3 times the size of the old image.
Anthony Thyssen ( System Programmer ) <[EMAIL PROTECTED]>
-----------------------------------------------------------------------------
"90% of everything is crap!" - Sturgeon's Law
-----------------------------------------------------------------------------
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