Re: GM loses transparency on some grayscale PNG images?
Bob Friesenhahn <[email protected]> Thu, 19 Sep 2019 20:03:49 -0500 (CDT)
| Newsgroups | gmane.comp.video.graphicsmagick.help |
|---|---|
| Message-ID | <[email protected]> |
Now that I look at the related code in Magick++/lib/Options.cpp I see
that it does this:
Magick::ImageType Magick::Options::type ( void ) const
{
return _imageInfo->type;
}
The ImageInfo structure is used for input options rather than for
output.
The related code in Magick++/lib/Image.cpp forwards the request like:
// Image representation type
Magick::ImageType Magick::Image::type ( void ) const
{
ExceptionInfo exceptionInfo;
GetExceptionInfo( &exceptionInfo );
ImageType image_type = constOptions()->type();
if ( image_type == UndefinedType )
image_type= GetImageType(constImage(), &exceptionInfo);
throwImageException( exceptionInfo );
return image_type;
}
The core library function which returns the desired
value is GetImageType() in magick/analyze.c. We can see that this
function is called if the value returned by constOptions()->type() is
UndefinedType. I assume that it is not returning UndefinedType.
The default value for ImageInfo->type is UndefinedType (0). What I am
wondering is why the value is apparently not UndefinedType in your
program?
Bob
--
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt