Re: MagickGetImageAttribute and a transparency question
Bob Friesenhahn <[email protected]> Mon, 21 Jan 2013 08:48:15 -0600 (CST)
| Newsgroups | gmane.comp.video.graphicsmagick.apis |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 21 Jan 2013, Manfred Rebentisch wrote: > Hello Bob, > there is the function MagickGetImageAttribute() in magick_wand. How can > I found the possible values for the parameter <name>?? > > And the other question: > How can I determine, whether an image has transparency? These are good questions. The image may have attributes which are stored as members in the image structure and don't have attribute names and so they can't be accessed via MagickGetImageAttribute(). Other attributes are stored as key/value and can be returned by MagickGetImageAttribute(). Look at the documentation for -format in the gm manual page for how IPTC and EXIF names are composed and the names which are documented to be available. You can also do gm identify -verbose file.jpg on an image file which is likely to contain the attributes you are interested in and see what is reported. For the question about transparency, the only/best method I see is to use MagickGetImageType() and check if the returned value is one of GrayscaleMatteType, PaletteMatteType, TrueColorMatteType, or ColorSeparationMatteType. Bob -- Bob Friesenhahn [email protected], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122412