Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
davemilter
Posts: 2 Joined: 2018-01-22T14:09:34-07:00
Authentication code: 1152
Post
by davemilter » 2018-01-22T14:15:09-07:00
I want display image with such format:
>The image is stored using a 32-bit RGB format (0xffRRGGBB).
4 bytes per pixel 600 pixel per row, 600 rows.
I tried this:
Code: Select all
display -size 600x600 -depth 8 RGBO:/tmp/image.data
display -size 600x600 -depth 32 RGBO:/tmp/image.data
But didn't see suitable picture.
snibgo
Posts: 12159 Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK
Post
by snibgo » 2018-01-22T15:00:09-07:00
I expect this will work:
Code: Select all
convert -size 600x600 -depth 8 RGBA:in.bin out.png
But this puts values in the wrong channels, so you will need to discard the last channel:
Code: Select all
convert -size 600x600 -depth 8 RGBA:in.bin -channel RGBA -separate -delete 0 -combine out2.png
davemilter
Posts: 2 Joined: 2018-01-22T14:09:34-07:00
Authentication code: 1152
Post
by davemilter » 2018-01-22T15:10:45-07:00
Thank you, snibgo.
This one works as expected:
Code: Select all
convert -size 600x600 -depth 8 BGRA:image.data -channel BGRA -separate -delete 3 -combine out2.bmp