Re: GIMP distributing sRGB profiles: license issues?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, 2010-03-08 at 05:53 +0000, Omari Stephens wrote:

> So, you're right; I had dismissed this possibility out-of-hand without 
> investigating sufficiently.  Having poked around the lcms code a bit, I 
> don't think this option is feasible.
> 
> Basically, lcms generates an RGB profile with the sRGB primaries, 
> transfer functions (aka "gamma curve"), and whitepoint; for the curious, 
> this happens in cmsCreate_sRGBProfile() in cmsvirt.c .  For one, I'm not 
> sure if this is all there is to a "real" sRGB profile (although it 
> certainly might be; thoughts, Graeme?).

It is a "real" sRGB profile. If you look at the color management code in
GIMP, you will notice that we use this built-in sRGB profile and that we
even do an MD5 hash comparison against it to find out whether an
attached profile is an sRGB profile. This is done to avoid a needless
conversion from one sRGB profile to another identical sRGB profile.

> Secondly, even if that's all there is to it, there doesn't seem to be a 
> way to get a profile _out_ of lcms.  The prototypes for profile 
> input/output are limited to cmsOpenProfileFromFile(), 
> cmsOpenProfileFromMem(), and cmsCloseProfile().  Nothing about exporting 
> a profile in any way.

Since the in-memory representation you get from cmsCreate_sRGBProfile()
has the same MD5 sum as an sRGB profile opened from disk, it appears
that it should be sufficient to use g_file_set_contents() to write it to
disk (if that is needed at all). Or to use gimp_parasite_new() to create
a parasite from it (which is more likely what you will want to do).


Sven


_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux