Montage result of some RGBA PNG files gets paletted colors

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?".
Post Reply
tgboy
Posts: 4
Joined: 2013-01-11T03:55:05-07:00
Authentication code: 6789

Montage result of some RGBA PNG files gets paletted colors

Post by tgboy »

I use montage (ImageMagick 6.8.1-9 2013-01-04 Q16 with Windows7 64bit SP1) on several png files to concatenate them with the following command:
montage.exe -mode concatenate -background none -tile 1x *.png result.png

There are some png files where the concatenated result file is not editable with Photoshop CS5 Extended (with GIMP is ok). The source files seems correct for me.
Here are the first two frame of a sequence and the concatenated result file.

image1.png
Image

image2.png
Image

result.png
Image

In Photoshop the result file seems corrupt, can't edit and some region of the image shows black pixels.
Last edited by tgboy on 2013-01-19T06:00:02-07:00, edited 2 times in total.
tgboy
Posts: 4
Joined: 2013-01-11T03:55:05-07:00
Authentication code: 6789

Re: Montage result of some RGBA PNG files are strange

Post by tgboy »

Anybody checked my result image file?
Could be the error in my source image files or in the montage's concatenate routine?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Montage result of some RGBA PNG files are strange

Post by snibgo »

Your result looks fine to me. I can't see any corruption. Gimp can open and edit it without complaint. Replicating your command in IM 6.7.9 gives an identical result.
snibgo's IM pages: im.snibgo.com
tgboy
Posts: 4
Joined: 2013-01-11T03:55:05-07:00
Authentication code: 6789

Re: Montage result of some RGBA PNG files are strange

Post by tgboy »

You're right. The GIMP can open result file correctly and can work with it.

I was still curious why photoshop can't edit this result file so I search the Internet after a png validator and I found the following program:
http://entropymine.com/jason/tweakpng/

I compared two of my concatenated result file. One is editable with Photoshop and one is not.
The most significant difference was the PLTE chunk. I found that concatenated PNG image result files with PLTE chunk I can't edit or use it in Photoshop or a specific 3rd party image container program.

When I used Google with search phrase "imagemagick montage concatenate palette" I found this Imagemagick post:
viewtopic.php?f=1&t=17541

where I found the answer for my problem. I have to use "PNG32:" switch to not let the montage.exe use palette chunk even if the number of colors are enough small to store them in palette.
Now all of my result file is editable, not using paletted color.
Last edited by tgboy on 2013-01-19T07:07:48-07:00, edited 1 time in total.
tgboy
Posts: 4
Joined: 2013-01-11T03:55:05-07:00
Authentication code: 6789

Re: Montage result of some RGBA PNG files gets paletted colo

Post by tgboy »

I must apologize because it's not a bug more than a specific result in certain situation.
I would like to ask an administrator to put my topic into a more proper place like "Users".

Thank you!
Post Reply