Reputation: 3625
I am trying to convert some image (raw) that has no header, just the pixel values to a png, so I can view it. I found some information here (using imageMagik) and it works if the image is one channel. I used the command
convert -depth 8 -size 5312x2988+0 gray:image.raw pic.png
I searched more and I found that using the rpg is a way to treat more channels image, so I changed the syntax to
convert -depth 8 -size 5312x2988+0 rgb:image.raw pic.png
... but the output seems to be more like a 9x9 matrix containing the small images, like
R R R
G G G
B B B
The size is not wrong, but it may be the way the pixels are stored (interlaced/not-interlaced).
Can anyone help me to convert the 3-channel image, the correct way?
Upvotes: 3
Views: 2592
Reputation: 208052
You could try specifying -interlace plane
before the input file. Or maybe -interlace line
, like this:
convert -interlace plane -depth 8 -size 5312x2988+0 rgb:image.raw pic.png
Like many ImageMagick parameters, you can enumerate the options at the command line with identify -list OPTION
, so, in this case:
identify -list interlace
Output
Line
None
Plane
Partition
GIF
JPEG
PNG
Upvotes: 1