Re: [GM-core] Does GraphicsMagick encapsulate littlecms functionality?

Bob Friesenhahn <[email protected]> Wed, 19 Jun 2013 14:44:11 -0500 (CDT)
Newsgroups gmane.comp.video.graphicsmagick.apis,gmane.comp.video.graphicsmagick.core
Message-ID <[email protected]>
On Wed, 19 Jun 2013, Patrick Noffke wrote:

> Hi,
>
> I'm interested in adding support to Octave for doing color transforms,
> and my first thought was to directly use the littlecms library.  But
> it was suggested that, since we use GraphicsMagick (Magick++) in
> Octave's image package, and it appears GM has some support for at
> least loading ICC profiles, it might make sense to use GM to do the
> color transforms.
>
> Do you encapsulate any of the functions from littlecms in a class or
> other API within GM?  If so, could you please give me an idea what
> files to look in?

GM has the ability to attach and/or apply CMS profiles.  The interface 
is really simple.  The code which does the work is in 
magick/profile.c.  Via Magick++ you can add a CMS profile (from 
memory) to an image or retrieve from the image to memory.

> Since we have an indirect dependency on littlecms through GM, it might
> just be easier to use littlecms directly, but I wanted to ask here to
> make sure I wasn't reinventing any wheels.
>
> I'm interested in adding functionality to load ICC profiles into a
> structure within Octave, and pass that structure down to functions (to
> be written) for applying color transforms.  These will operate mostly
> on images, but can be used for any data from within Octave.  In other
> words, if any API is tied to an image within GM, it might be difficult
> to use in Octave.

CMS APIs in GraphicsMagick are intended to work on images in 
GraphicsMagick's own representation.  If your data can not be turned 
into a GM image then you would want to use lcms APIs directly.

Bob
-- 
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev