From: <ma...@li...> - 2001-05-18 08:24:22
|
Hi, Thank you. I will add your changes to main sources > I no doubt have many other questions about usege. My main one is how to > go from a internal format (BBitmap class) to pass though the CMS. > Seeing as Translate takes in two profiles. Do I need to make a virtual > profile for the bitmap class? Questions are welcome ;). I'm taking the freedom to CC: this into the mailing list, since these are frequent questions. Hope this is Ok to you. The problem here is in what colorspace are supposed to be this internal format. If you know the primaries, white point and gamma curve of these bitmaps, then a virtual profile is quite adequate. But most times, you know nothing but the RGB data. In Windows, there is a "standard" default colorspace, assumed by most hardware manufacturers (sRGB) I'm not shure this would apply to Be as well. You can use the included "sRGB Color space profile.icm" or this function, that builds sRGB without any file: ---------------------------------------------------------------------------- --- >8 cut cmsHPROFILE Create_sRGB_Profile(void) { cmsCIExyY D65; cmsCIExyYTRIPLE Rec709Primaries = { {0.6400, 0.3300, 1.0}, {0.3000, 0.6000, 1.0}, {0.1500, 0.0600, 1.0} }; LPGAMMATABLE Gamma24[3]; cmsHPROFILE hsRGB; cmsWhitePointFromTemp(6504, &D65); Gamma24[0] = Gamma24[1] = Gamma24[2] = cmsBuildGamma(256, 2.4); hsRGB = cmsCreateRGBProfile(&D65, &Rec709Primaries, Gamma24); cmsFreeGamma(Gamma24[0]); return hsRGB; } ---------------------------------------------------------------------------- --- >8 cut Another valid approach, is to consider that these bitmaps are not characterized ant then, color management doesn't make sense on them. You can still use the formatting features of lcms by using cmsFLAGS_NULLTRANFORM. This inhibits any color management. >Hey, I was wondering if lcms is thread safe and all. Thought I would >make sure befor I go to far .. Yes. lcms is thread safe on USE_C and USE_FLOAT implementations. The USE_ASSEMBLY implementation is not, but this latter is only available on windows. And I'm thinking about to strip that one, since the gain of speed is not so big on modern machines. Regards, Martí Maria The little cms project http://www.littlecms.com ma...@li... ----- Original Message ----- From: "YNOP" <jt...@en...> To: <ma...@li...> Sent: Thursday, May 17, 2001 9:48 PM Subject: Re: lcms > >About your #ifdef... I would like to incorporate in main sources... > >Could I ask the lines you have added? Seems very interesting. > > the only changes I made to the src are this: > > File cmsio1.c I added the below code. There may be a better place to up > this. There probalby is also a better way to test is the swab function > exists .. but this works .. so no big deal. > > #ifdef __BEOS__ > /*static char *sccsid = "from: @(#)swab.c 5.10 (Berkeley) > 3/6/91";*/ > void > swab(from, to, len) > const void *from; > void *to; > size_t len; > > register unsigned long temp; > register int n; > register char *fp, *tp; > > n = (len >> 1) + 1; > fp = (char *)from; > tp = (char *)to; > #define STEP temp = *fp++,*tp++ = *fp++,*tp++ = temp > /* round to multiple of 8 */ > while ((--n) & 07) > STEP; > n >>= 3; > while (--n >= 0) > STEP; STEP; STEP; STEP; > STEP; STEP; STEP; STEP; > } > } > #endif > > > > the only other changes I made were in the testbed dir, I got rid of the > Make file because it didn't work, missing Include of lcms.h or something > .. > > Also your install.gcc script does not work on be due to the lack of > /usr/ directory and such. > > I no doubt have many other questions about usege. My main one is how to > go from a internal format (BBitmap class) to pass though the CMS. > Seeing as Translate takes in two profiles. Do I need to make a virtual > profile for the bitmap class? > > Well I will mess with it some more ... thanks for your help ... > > > > YNOP > yn...@ac... > http://www.?.com > ---------------------------------------------------------- > Too much, too easy, it's lethal. Some, not too easy, the parasite is > tolerated. > - Jean-Louis Gassee, Be, Inc. > > > ----------------------------------- > This message was sent with the demo version of Postmaster, a BeOS mail client. > For more information, please visit http://kennyc.com/postmaster > > > |