C code generated ARGB files
Posted: 2010-08-19T02:28:32-07:00
I generate millions of ARGB files using a C code and I need them in a "light" .jpg format as-well.
At the moment I use GraphicConverter (http://www.lemkesoft.com/) but as my ARGB files are piling up and getting bigger too I would like to run the conversion from the command line on the machine they are generated on.
The files have no header, they are produced on an Intel machine so their byte order is Little-Endian. Their color depth is 24 (or 32) and their format is ARGB (in GraphicConverter I have to check the "Interlaced" option to get the correct result).
For instance:
A file 1337x750 weighs 4011000 bytes which is 1337 x 750 x 4 (four 0-255 integers, one for each component - A, R, G, B in that order).
What should be the correct convert line in order to get it right?
This doesn't work:
neither does this:
At the moment I use GraphicConverter (http://www.lemkesoft.com/) but as my ARGB files are piling up and getting bigger too I would like to run the conversion from the command line on the machine they are generated on.
The files have no header, they are produced on an Intel machine so their byte order is Little-Endian. Their color depth is 24 (or 32) and their format is ARGB (in GraphicConverter I have to check the "Interlaced" option to get the correct result).
For instance:
A file 1337x750 weighs 4011000 bytes which is 1337 x 750 x 4 (four 0-255 integers, one for each component - A, R, G, B in that order).
What should be the correct convert line in order to get it right?
This doesn't work:
Code: Select all
convert -size 1337x750 -depth 32 rgb:snap.02000.x.argb snap.02000.x.jpg
convert: Unexpected end-of-file `snap.02000.x.argb': No such file or directory.
Code: Select all
convert -size 1337x750 -depth 32 argb:snap.02000.x.argb snap.02000.x.jpg
convert: unable to open image `argb:snap.02000.x.argb': No such file or directory.
convert: missing an image filename `snap.02000.x.jpg'.