R: Re: R: Re: R: Re: understand ImageType, ClassType and ColorspaceType

"[email protected]" <[email protected]> Tue, 16 Apr 2013 11:37:55 +0200 (CEST)
Newsgroups gmane.comp.video.graphicsmagick.apis
Message-ID <21690452.1646611366105075319.JavaMail.defaultUser@defaultHost>
As always your advice is very useful.
I'm sorry, but unfortunately I still have some doubts.
Attached are two different images that exibits the same properties.
ClassType=DirectClass, ImageType=BilevelType, depth=	8, 
ColorSpaceType=sRGBColorspace.
In both cases matte() returns false.
Is this the case where GraphicsMagick strips the alpha channel because it 
detects that the image is completely opaque?
I assume that my knowledge about trasparency, alha-channel, matte and the 
relationship between them is insufficient.
There are theoretical considerations that I have not considered?
thanks a lot,

Paolo Pazziani


>----Messaggio originale----
>Da: [email protected]
>Data: 12/04/2013 16.00
>A: "[email protected]"<[email protected]>
>Cc: <[email protected]>
>Ogg: Re: R: Re: R: Re: [GM-apis] understand  ImageType, ClassType and 
ColorspaceType
>
>On Fri, 12 Apr 2013, [email protected] wrote:
>
>> Thank you very much.
>> Your help was very helpful. I still have some questions:
>> 1) There is a project for the creation of tutorials, examples and
>> documentation shared (like wiki)? If so, I'd like to give my contribution.
>
>Due to the recent SourceForge project upgrade, GraphicsMagick now 
>seems to have a Wiki.  I don't yet have any experience with it.
>
>It is most useful if improvements make it into the project itself 
>rather than a Wiki.  The web pages are mostly sourced from '.rst' text 
>files under the 'www' subdirectory of the source tree.  For example 
>the 'types' documentation comes from "www/api/types.rst".  Patches are 
>appreciated.
>
>> 2) I made ​​a test on a 32-bit bitmap where the alpha channel is equal to 
255
>> (FF hex), but the matte() method returns 0. How can I distinguish bitmap 
where
>> the alpha channel is not ignored?
>
>If you read from a file which has an alpha channel, then matte should 
>be automatically enabled and return true.  If you create your own 
>image (using the APIs) then you will need to enable it yourself (e.g. 
>"image.matte(true)").  This can also be used to easily remove the 
>opacity channel if you want to ignore it.
>
>GraphicsMagick may strip the alpha channel when writing if it detects 
>that the image is completely opaque.
>
>Bob
>-- 
>Bob Friesenhahn
>[email protected], http://www.simplesystems.org/users/bfriesen/
>GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter

_______________________________________________
Graphicsmagick-apis mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-apis
BW_32BPP.bmp (image/bmp, 9.1 KB) - not displayed
BW_24BPP.bmp (image/bmp, 6.8 KB) - not displayed