fill the palette when converting to bmp
Posted: 2019-04-06T07:05:15-07:00
I am trying to convert a png image with 4 unique colors to a bmp3 with a 256 color palette.
I am using this command:
and getting this error:
the image is converted, and the resulting image looks exactly like the original. However, when I use identify on image.bmp I can see that the depth is 4/8-bit and not 8-bit and that the colormap contains only 16 color(the 4 colors of the image and 12 times black) instead of 256 colors(depth 8).
I want the resulting colormap to contain 256 colors(the 4 of the image and 252 more). how do I do that?
Version: ImageMagick 7.0.8-37 Q16 x64 2019-04-03 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180040629
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib cairo flif freetype gslib heic jng jp2 jpeg lcms lqr lzma openexr pangocairo png ps raw rsvg tiff webp xml zlib
I am using this command:
Code: Select all
convert image.png -type palette -depth 8 -compress none BMP3:image.bmp
Code: Select all
convert: bKGD: invalid `image.png' @ warning/png.c/MagickPNGWarningHandler/1747.
I want the resulting colormap to contain 256 colors(the 4 of the image and 252 more). how do I do that?
Version: ImageMagick 7.0.8-37 Q16 x64 2019-04-03 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180040629
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib cairo flif freetype gslib heic jng jp2 jpeg lcms lqr lzma openexr pangocairo png ps raw rsvg tiff webp xml zlib