Page 1 of 1

which function in Magick++ performs like "-layers optimize"?

Posted: 2010-01-12T18:14:27-07:00
by carol_sun
"Lets now use the "-layers", method 'OptimizeTransparency' (Added IM v6.3.4-4) to replace any pixel that does change the displayed result with transparency. "
see: http://www.imagemagick.org/Usage/anim_opt/#opt_trans
By using "Transparency Optimization", the gif file size would be reduced.

Except command-line tool, I want to know which function can fulfish this in Magick++. Who can tell me ?
http://www.imagemagick.org/Magick++/STL.html
I didn't find it.

Re: which function in Magick++ performs like "-layers optimize"?

Posted: 2010-01-12T18:39:51-07:00
by magick
The OptimizeImageLayers() method is not currently supported under Magick++ at this time. You can call MagickCore methods from Magick++ with the MagickCore namespace prefix, e.g. MagickCore::OptimizeImageLayers().

Re: which function in Magick++ performs like "-layers optimi

Posted: 2010-03-02T19:45:11-07:00
by carol_sun
thank you very much~
By using both of the functions as follow, the gif image size was reduce.
thumbnails = OptimizeImageLayers(thumbnails, exception);
OptimizeImageTransparency(thumbnails, exception);