Page 1 of 1

RGB555/RGB565 etc are not working

Posted: 2018-03-20T05:04:34-07:00
by 246246
According to the document https://www.imagemagick.org/script/comm ... php#define or from https://github.com/ImageMagick/ImageMagick/issues/344 , writing in format RGB555/RGB565 etc are now supported.
But it does not seem to be working:

Code: Select all

P:>magick -version
Version: ImageMagick 7.0.7-27 Q16 x64 2018-03-18 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180040629
Features: Cipher DPC HDRI Modules OpenMP
Delegates (built-in): bzlib cairo flif freetype gslib heic jng jp2 jpeg lcms lqr
 openexr pangocairo png ps raw rsvg tiff webp xml zlib

P:>magick logo: logo.bmp

P:>magick logo: -define bmp:subtype=RGB565 logo565.bmp
Then in MSYS2 bash

Code: Select all

$ ls -lg *.bmp
-rw-r--r-- 1 Domain Users 52080 Mar 20 20:54 logo.bmp
-rw-r--r-- 1 Domain Users 52080 Mar 20 20:54 logo565.bmp

$ cmp logo.bmp logo565.bmp

Both command generate the same file.

Re: RGB555/RGB565 etc are not working

Posted: 2018-03-20T05:24:51-07:00
by 246246
I think it is solved.
It looks -type truecolor is required in this case.

Code: Select all

magick logo: -type truecolor -define bmp:subtype=RGB565 logo565.bmp

Re: RGB555/RGB565 etc are not working

Posted: 2018-03-20T12:47:35-07:00
by Jason S
(For recent discussion of these options, see viewtopic.php?f=1&t=33334, viewtopic.php?f=2&t=33344.)

Right. I didn't make it clear, but these option are implemented as hints. They'll be ignored if, for example, IM decides to use a paletted format instead. (Or at least, that was the case when I last looked at it.) I suspect this is not what most users expect.