On Thu, 18 Aug 2005, Michal Paczek wrote:
On Thu, 23 Jun 2005, Michal Paczek wrote:
Does anybody know how to use Littlecms functions in ImageMagick?
How to convert colorspace of Image object (c code api) with defined
profile (ICC) ?
This is done via a ProfileImage() function. The profile is supplied as an
in-memory BLOB. If the image does not already have a ICC profile attached
to it, the call to ProfileImage() simply attaches to supplied profile to
the image and no transformations are done to the pixels. If the image
already has an ICC profile, then ProfileImage() invokes the CMS transform
based on the two profiles to convert the image pixels to the target space.
The functioning is really simple and is definitely not a "system" but it
works well in the hands of a CMS expert.
I still have problem with colorspace conversion and don't know how to load
ICC prifile from file. Which function does that thing? What is exactly datum
argument in ProfileImage() funciton?
Can you give me some example how to use this function and make ColorSpace
conversion...?
I do not have time to supply a complete code example, but I can
provide some more hints. The user of ProfileImage() needs to copy the
entire ICC profile from disk into memory somehow. For example, this
may be accomplished via fopen() & fread(). The 'datum' argument is
the address in memory where the profile has been loaded, and the
length argument is the size of the profile in memory.
In addition to ProfileImage(), ImageMagick provides SetImageProfile()
which can be used to attach an initial profile to the image without
applying any CMS transforms.
You can use GetImageProfile() to gain access to an existing profile
which is attached to the image. This is useful in order to know if
the image already had a profile, or perhaps if you want to use the
same profile for other things.
Bob
======================================
Bob Friesenhahn
[EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user