Hello,
I have installed ImageMagick-7.0.6-0-Q8-x64-dll.exe in Windows 7
With 24 bit RGB images as input I get
C:\test>montage -type palette -geometry +0+0 bad.png out.png
montage: image has 0 colors `out.png' @ error/png.c/MagickPNGErrorHandler/1666.
C:\test>convert -type palette bad.png out.png
convert: Valid palette required for paletted images `out.png' @ error/png.c/MagickPNGErrorHandler/1666.
With good.png everthing is fine. out.png is an 8-bit paletted image. Both images are generated in the same way. I can't see any fundamental difference. So whats wrong here?
Since I didn't find any option to attach the image, I have uploaded example.zip them here:
https://1fichier.com/?1qk9uz1pyb
Option -type palette results in output error with some pngs
-
- Posts: 2
- Joined: 2017-07-05T15:21:20-07:00
- Authentication code: 1151
Re: Option -type palette results in output error with some pngs
Verified that your commands fail. I get reasonable output if I replace "-type palette" with "-colors 255".
I needed to add "-depth 8" to the montage command; otherwise the output was a 48-bit RGB PNG.
I needed to add "-depth 8" to the montage command; otherwise the output was a 48-bit RGB PNG.
-
- Posts: 2
- Joined: 2017-07-05T15:21:20-07:00
- Authentication code: 1151
Re: Option -type palette results in output error with some pngs
Thanks for your help. The option -colors255 works but I am not sure what -colors255 is intended to do, whether it forces paletted output or whether it simply reduces the number of colors
I need paletted output for saving memory and it should be the same behaviour for png, tif and others.
I also tried version 6.9.8 and got the same errors.
I need paletted output for saving memory and it should be the same behaviour for png, tif and others.
I also tried version 6.9.8 and got the same errors.