Re: [Lcms-user] Release candidate of lcms2-2.6 now available
marti.ma...@littlecms.com wrote: > Yep, that is how actually works, and this is the source of all pain. > What I really need is a sort function that given a pointer, would guess > if this points to a cmsContext internal structure or to used supplied > data. If the assumption is that the context is always a pointer, and if the cmsContext is issued by lcms, then the only reliable way to do it is for lcms to keep track of the addresses it's issued. One approach would be to allocate them in blocks, and then match against block ranges. Another would be to use a hash list, and check whether each one is in the list. Naturally the allocate & check code has to be multi-thread safe, etc. If the context doesn't have to be a pointer (ie. if the client can invent any bit combination it likes), then there is no 100% reliable way of identifying a cmsContext. The best you could do is play roulette and hope that the client doesn't happen to use a bit combination that matches the lcms cmsContext pointer values. If the client code has to be changed anyway to use the new cmsContext (ie. to get one and then supply it to each function call), then another approach would be to use different function names for the cmsContext, ie. cmsCreate_sRGBProfileLCX() etc., so that the _THR functions can remain unchanged, and internally there is then no doubt about what sort of context it is. Graeme Gill. -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
On 13 February 2014 18:30, wrote: > if (ptr & 0x1) { > I'm right now open to other ideas. Why not do the opposite? i.e. use the *first* bit rather than the last -- malloc seems to always align the returned addresses to 32 bits on my 64 bit platform. If the ctx & 0x01 > 0 then it's a cmsContext, otherwise it's a constant or struct address. Richard -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Nchannel ICC profiles
Hi Dietrich, DeviceN profiles are fully supported in lcms2. Just handle them as any other, but with more channels. Regards Marti Quoting Dietrich von Seggern : > Hi, > > we are using the little cms in our own application. We have received > a request from a customer who wants to use what he calls DeviceN ICC > profiles (NOT DeviceLink!), I have heard from others that these are > rather Nchannel profiles. I was not able to find any information > about that on the Little CMS webpage. > > Any information would be greatly appreciated. Thank you in advance. > > Best regards, > Dietrich > > -- > Dietrich von Seggern | Business Development Manager > callas software GmbH | Schönhauser Allee 6/7 | 10119 Berlin | Germany > Tel +49.30.4439031-0 | Fax +49.30.4416402 > Amtsgericht Charlottenburg, HRB 59615 | Geschäftsführung: Olaf > Drümmer, Ulrich Frotscher > > > > > > > > > > > > -- > Android apps run on BlackBerry 10 > Introducing the new BlackBerry 10.2.1 Runtime for Android apps. > Now with support for Jelly Bean, Bluetooth, Mapview and more. > Get your Android app in front of a whole new audience. Start now. > http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk > ___ > Lcms-user mailing list > Lcms-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/lcms-user -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
[Lcms-user] Nchannel ICC profiles
Hi, we are using the little cms in our own application. We have received a request from a customer who wants to use what he calls DeviceN ICC profiles (NOT DeviceLink!), I have heard from others that these are rather Nchannel profiles. I was not able to find any information about that on the Little CMS webpage. Any information would be greatly appreciated. Thank you in advance. Best regards, Dietrich -- Dietrich von Seggern | Business Development Manager callas software GmbH | Schönhauser Allee 6/7 | 10119 Berlin | Germany Tel +49.30.4439031-0 | Fax +49.30.4416402 Amtsgericht Charlottenburg, HRB 59615 | Geschäftsführung: Olaf Drümmer, Ulrich Frotscher -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
On Thu, 13 Feb 2014, marti.ma...@littlecms.com wrote: > > Obviously you are right and my description of the issue was wrong, > actually the reports I got was about an application using both lcms2 > and another library which was using lcms2 as well. The app did set > its own memory management via a plug-in, but after calling the > second library (which also set its own memory management) the > callbacks pointed to the second library mem manager and > segfaulted badly because all libs were deployed as .so and the > callbacks were pointing to hyperspace. The IJG JPEG (starting with release 8 I think) and TIFF libraries added link-time symbol versioning to help avoid such problems. With symbol versioning, each dependent app/library gets the function/variable version compatible with the version it was linked with, even if there are several versions of the library loaded into the application. This feature works under Linux, FreeBSD, and perhaps some other OSs. Perhaps lcms should consider doing this as well, especially if it changes the major number of the library. Bob -- Bob Friesenhahn bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/ -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
Quoting Bob Friesenhahn : > These descriptions of static vs shared libraries don't make any > sense to me. On the planet I live on, programs using a shared > library always get private data and there is no sharing of data > between programs due to using a shared library. There are platforms > (e.g. Microsoft Windows) which support DLLs which are really > multi-threaded servers (shared memory space) under the guise of a > library but these are not normal DLLs and need to be registered with > the OS as a sort of server. Obviously you are right and my description of the issue was wrong, actually the reports I got was about an application using both lcms2 and another library which was using lcms2 as well. The app did set its own memory management via a plug-in, but after calling the second library (which also set its own memory management) the callbacks pointed to the second library mem manager and segfaulted badly because all libs were deployed as .so and the callbacks were pointing to hyperspace. Sorry about the confusion. Regards Marti -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
Quoting Kai-Uwe Behrmann : > Am 13.02.2014 17:51, schrieb marti.ma...@littlecms.com: >> Still, the issue continues to be in how to differentiate cmsContext >> from user data. If we could fix that, then compatibility would >> be kept. > > Just an idea: Yep, that is how actually works, and this is the source of all pain. What I really need is a sort function that given a pointer, would guess if this points to a cmsContext internal structure or to used supplied data. My first idea was to use a bit in the very upper part of the pointer, but this is not portable and would need an integral type wider than a pointer. if (ptr & 0x1) { Context = ptr & !0x1; // this is a context usr = NULL; } else { Context = NULL; usr = ptr; // A user pointer. } I'm right now open to other ideas. Regards Marti -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
Am 13.02.2014 17:51, schrieb marti.ma...@littlecms.com: > Still, the issue continues to be in how to differentiate cmsContext > from user data. If we could fix that, then compatibility would > be kept. Just an idea: typedef struct { const char type_[8]; // more members here void * user_data; } cmsContext; cmsContext c = {"lcms2.6", NULL}; cmsContext * cmsTakeContext( cmsStruct ptr ) { cmsContext * c = ptr->context; if(sizeof(*c) > 8 && memcmp(c->type_, "lcms2.6", 8) == 0) return c->user_data; else return c; } The above example comes with some computational cost. But you can skip this check with lcms-3.0 in the future. Alternatively a enum might be fine too. Obviously there remains a risk that a four byte type identifier might fit by accident to the four bytes enum, and thus above function returns a wrong pointer. kind regards Kai-Uwe -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
On Thu, 13 Feb 2014, marti.ma...@littlecms.com wrote: > > Quoting Bob Friesenhahn : > >> I strongly recommend against releasing this new version of the >> library until it is proven that existing software can be >> successfully adapted to it. > > Bob, this is exactly the point of release candidates. If we found > it to break applications, then this should be fixed somehow before > releasing the code. Yes. It seems that more than two weeks will be necessary in order to certify this release candidate and additional release candidates will be required. Usually release candidates are assumed to be a drop-in for previous releases and the release candidate is just a formality. Bob -- Bob Friesenhahn bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/ -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
Quoting Bob Friesenhahn : > I strongly recommend against releasing this new version of the > library until it is proven that existing software can be > successfully adapted to it. Bob, this is exactly the point of release candidates. If we found it to break applications, then this should be fixed somehow before releasing the code. Still, the issue continues to be in how to differentiate cmsContext from user data. If we could fix that, then compatibility would be kept. Regards Marti -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
On Thu, 13 Feb 2014, marti.ma...@littlecms.com wrote: > > 1) Any client using THR functions and the lib as shared object > is basically broken. if a client sets a listener or plug-in, > it got events from any other clients of the .so, with > obviously unexpected user data format. This causes segfaults. These descriptions of static vs shared libraries don't make any sense to me. On the planet I live on, programs using a shared library always get private data and there is no sharing of data between programs due to using a shared library. There are platforms (e.g. Microsoft Windows) which support DLLs which are really multi-threaded servers (shared memory space) under the guise of a library but these are not normal DLLs and need to be registered with the OS as a sort of server. I do appreciate the concern about applications which use a thread-specific memory allocator (as Ghostscript is apparently doing) since then it would then be wrong to for a thread to deallocate a pointer allocated by a different thread. All standard memory allocators (i.e. malloc()/free()) assure that memory is deallocated to the pool that it came from but of course this requires locking in multithreaded programs. A program can have several lcms transforms going on at once (managed by different threads), each of which has an associated team of worker threads to speed-up the transform. This is the expectation in my own software. Regardless, this change seems rather large and removes a central premise of lcms2 which was previously advertised to be used. I will have to study my code to see how to continue supporting lcms1, lcms2, and now lcms2-2.6+. There are still many systems in active use which have only lcms1. I strongly recommend against releasing this new version of the library until it is proven that existing software can be successfully adapted to it. Bob -- Bob Friesenhahn bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/ -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
On 13 February 2014 15:18, wrote: > A genuine bug, thank you. On 2.6 erasing tags by using NULL *is* > supported and documented (though you discovered to be buggy) Confirmed fixed in git, thanks. Richard -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
Am 13.02.2014 15:40, schrieb marti.ma...@littlecms.com: > Quoting Kai-Uwe Behrmann : >> cmsGetContextUserData() can be used to obtain a referenced object and >> release it upon lcms handle destroy. But how can one get the passed in >> cmsContext before calling e.g. cmsCloseProfile(). >> >> My function sequence is essentially: >> id = cmsCreateContext(NULL, my_object) >> profile = cmsOpenProfileFromMemTHR(id,...) >> // other code parts inbetween >> // How to get the my_object back to unref or free? >> cmsCloseProfile(profile) > > > You could use cmsGetProfileContext() or cmsGetTransformContext(), Oh I missed that, and this is even a elder API member. Thanks for pointing out. > Example: > my_object = cmsGetUserData(cmsGetProfileContext(profile)); Works fine and keeps code simple. kind regards Kai-Uwe -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
On 13 February 2014 16:20, Bob Friesenhahn wrote: > I just woke up to this discussion thread. A quick look at > GraphicsMagick code causes me to believe that this clearly causes the > new version not to work with GraphicsMagick since GraphicsMagick is > using this argument to keep track of its own context data. Yes, I came to the same conclusion. Richard. -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
Am 13.02.2014 16:20, schrieb Richard Hughes: > What I think might be a good idea is a function to get the *runtime* > (rather than the compile time) version of lcms. In that way I can > check for 0,2,6 at runtime and just abort, rather than crash in > strange ways. Agreed, a lcms runtime version allows for a more appropriate check for shared libraries. kind regards Kai-Uwe -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
On Thu, 13 Feb 2014, Robin Watts wrote: > > That's because the meaning of the 'cmsContext' has now changed in this > new version. > > Previously cmsContext was 'any opaque void * value that the caller > wanted to provide'. > > Now the cmsContext is a pointer to a (private) library defined structure > that holds the library state. One element of this structure is a > userdata pointer that is 'any opaque void * value that the caller wanted > to provide'. I just woke up to this discussion thread. A quick look at GraphicsMagick code causes me to believe that this clearly causes the new version not to work with GraphicsMagick since GraphicsMagick is using this argument to keep track of its own context data. I don't have time this morning to study the issue in any depth to evaluate the full impact. Bob -- Bob Friesenhahn bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/ -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
On 13 February 2014 13:29, wrote: > Valgrid complains and I'm concerned about that, but in some > cases it keeps working. Fixing the cases it does not work > is actually my first headache. So, I can certainly port the libcolord stuff to using the new context stuff in two weeks, and I can also do a release the same time you do the 2.6 release. What I think might be a good idea is a function to get the *runtime* (rather than the compile time) version of lcms. In that way I can check for 0,2,6 at runtime and just abort, rather than crash in strange ways. Richard. -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] PhotoShop CMYK on monitor
Hello Victor, > My results are different from those of Photoshop. > My results are: > > L = 70.0934, A = -28.1484, B = -36.5586 I have checked CS6 and got same Lab numbers in color picker. So lcms and Photoshop agrees on that. > The RGB result is different from the one showed in Photoshop. Could it be > that Photoshop is doing badly the CMYK painting? Could you check if creating two documents, one in RGB and the other in CMYK and then trying to fill both with same Lab results in different colors displayed? this would be surprising for me. regards Marti -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] PhotoShop CMYK on monitor
Hello Marti. Thanks for your answer. My results are different from those of Photoshop. Now I'm trying to get the same color in monitor as the one in a CMYK Photoshop document. I´m trying the following: transicc -i *Lab -o ISOnewspaper26v4.icc -t1 C = 100, M = 0, Y = 0, K = 0 My results are: L = 70.0934, A = -28.1484, B = -36.5586 I guess I can convert this Lab color, to display the CMYK pure cyan color into monitor. transicc -i *Lab -o CalibratedDisplay... -t1 The RGB result is different from the one showed in Photoshop. Could it be that Photoshop is doing badly the CMYK painting? Thanks. 2014-02-13 11:52 GMT+01:00 : > > Hi Victor, > > · I create a doc CMYK with color profile Iso. >> >> · I create a doc RGB with color profile Adobe. >> · I select color 100% pure cyan. >> · I paint the docs with this pure cyan. >> >> The results are different in monitor. >> > > That is the expected behavior. In the CMYK space this corresponds > to a color which is different in RGB space. If you want the same > color, use the same Lab values. I.e. crate the CMYK doc, then > "convert to profile" and use AdobeRGB as destination. > > > I´ve used transicc to obtain the color displayed on monitor and it´s the >> same in RGB docs but, what is sequence for CMYK docs? >> > > To get the same color, take the Lab value and convert it to > AdobeRGB. > > transicc -i ISOnewspaper26v4.icc -o AdobeRGB1998.icc -t1 > LittleCMS ColorSpace conversion calculator - 4.2 [LittleCMS 2.06] > > Enter values, 'q' to quit > C? 100 > M? 0 > Y? 0 > K? 0 > > R=103.6409 G=186.1771 B=234.5724 > > This is the value of that color in AdobeRGB. Now you may want to > use your calibrated display to view that color: > > transicc -i AdobeRGB1998.icc -t1 -o CalibratedDisplay.icc > > This can be done in a simple step without going across AdobeRGB > > transicc -i ISOnewspaper26v4.icc -o CalibratedDisplay.icc -t1 > > Make sure to use relative colorimetric intent in all paths, > this may well be the source of discrepancies you report. > > Regards > Marti > > > > > -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
Quoting Kai-Uwe Behrmann : > cmsContext is now ifdefed with LCMS_VERSION >= 2060 in the Oyranos lcm2 > module. Still need more testing while enabling mutli threaded transform > creation, which was so far disabled. Thanks Kai-Uwe, but I would wait a little to see if we decide to call this 2.6 or just 3.0 -- If i could find a way to differentiate cmsContext and user data, that would be 2.6, which I strongly prefer. Otherwise a .soname bump would be needed, and this a pain... > cmsGetContextUserData() can be used to obtain a referenced object and > release it upon lcms handle destroy. But how can one get the passed in > cmsContext before calling e.g. cmsCloseProfile(). > > My function sequence is essentially: > id = cmsCreateContext(NULL, my_object) > profile = cmsOpenProfileFromMemTHR(id,...) > // other code parts inbetween > // How to get the my_object back to unref or free? > cmsCloseProfile(profile) You could use cmsGetProfileContext() or cmsGetTransformContext(), Example: my_object = cmsGetUserData(cmsGetProfileContext(profile)); There is a new testbed for plug-ins that checks (almost) every single feature regarding the new context functionality. testbed/testplugin.c Regards Marti -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
> Another regression: [...] > Note. If I'm not supposed to use cmsWriteTag(NULL) to remove a tag, > then I need some other way to do this. And if cmsWriteTag() is > supposed to fail, it should probably not make the cmsCloseProfile() > explode... A genuine bug, thank you. On 2.6 erasing tags by using NULL *is* supported and documented (though you discovered to be buggy) Regards Marti -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
Am 13.02.2014 00:01, schrieb marti.ma...@littlecms.com: > At that point I wish to thank Artifex very much for the sponsoring- > without their aid, we would never have reached the functionality this > release has. Thanks, from me too. > What is new: > > lcms has no longer global variables anymore. By using cmsContext, > several apps can share lcms2 as a shared object and use different > plug-ins, loggers and settings. Each instance has its private context, > and contexts are not shared across apps. That's good to read. cmsContext is now ifdefed with LCMS_VERSION >= 2060 in the Oyranos lcm2 module. Still need more testing while enabling mutli threaded transform creation, which was so far disabled. > Ant that's all for now. If no stopper is found, the release of > lcms2-2.6 would happen in two weeks. Please feel free to download and > check the CMM in your application, if something does not work, let us > know. If it works fine, let us know as well. Weird platforms have an > extra bonus. Thank you again for your great support! cmsGetContextUserData() can be used to obtain a referenced object and release it upon lcms handle destroy. But how can one get the passed in cmsContext before calling e.g. cmsCloseProfile(). My function sequence is essentially: id = cmsCreateContext(NULL, my_object) profile = cmsOpenProfileFromMemTHR(id,...) // other code parts inbetween // How to get the my_object back to unref or free? cmsCloseProfile(profile) kind regards Kai-Uwe -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
On 13 February 2014 00:01, wrote: > if something does not work, let us know Another regression: //gcc -o test test.c `pkg-config --cflags --libs lcms2` && ./test #include #include #include int main(int argc, char *argv[]) { cmsHPROFILE p; cmsMLU *mlu; int ret; p = cmsCreate_sRGBProfileTHR(NULL); /* set value */ mlu = cmsMLUalloc (NULL, 1); ret = cmsMLUsetASCII (mlu, "en", "US", "bar"); assert (ret); ret = cmsWriteTag (p, cmsSigDeviceMfgDescTag, mlu); assert (ret); cmsMLUfree (mlu); /* remove the tag -- NOTE: this fails, it probably should succeed */ ret = cmsWriteTag (p, cmsSigDeviceMfgDescTag, NULL); //assert (ret); /* THIS EXPLODES */ cmsCloseProfile(p); return 0; } Using 2.5 I get a profile without a cmsSigDeviceMfgDescTag, using 2.6 I get: double free or corruption; bt looks like this: #2 0x77839d04 in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x77940528 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175 #3 0x77840ff8 in malloc_printerr (ptr=, str=0x77940600 "double free or corruption (!prev)", action=3) at malloc.c:4930 #4 _int_free (av=0x77b7c760 , p=, have_lock=0) at malloc.c:3782 #5 0x77bad72a in cmsMLUfree (mlu=0x605100) at cmsnamed.c:285 #6 0x77b9ae43 in cmsCloseProfile (hProfile=0x6041b0) at cmsio0.c:1393 #7 0x00400965 in main () Note. If I'm not supposed to use cmsWriteTag(NULL) to remove a tag, then I need some other way to do this. And if cmsWriteTag() is supposed to fail, it should probably not make the cmsCloseProfile() explode... Richard. -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
>> Personally, I have to say that I dislike the 'magically detect small >> integer values' hack. I'd vote for ditching it if that's the thing >> that's causing problems. If it is of no use, I will be more than happy to remove it. >> Possibly a stupid question, but could we build the current library >> twice? Once with the CMS_CONTEXT_IN_LEGACY_MODE to give liblcms2.so.2 >> and once without to give liblcms2.so.3 ? > > Sure, we could do that, although a configure --enable-new-style-ctx > that spits out the correct name would certainly be helpful. Seems quite a nice possibility. I have to double check it. Regards Marti -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
On 13 February 2014 13:22, Robin Watts wrote: > Personally, I have to say that I dislike the 'magically detect small > integer values' hack. I'd vote for ditching it if that's the thing > that's causing problems. I think you nailed it with "hack". > Possibly a stupid question, but could we build the current library > twice? Once with the CMS_CONTEXT_IN_LEGACY_MODE to give liblcms2.so.2 > and once without to give liblcms2.so.3 ? Sure, we could do that, although a configure --enable-new-style-ctx that spits out the correct name would certainly be helpful. Richard. -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
>> 1) Any client using THR functions and the lib as shared object >> is basically broken. if a client sets a listener or plug-in, >> it got events from any other clients of the .so, with >> obviously unexpected user data format. This causes segfaults. > > Right, and in the case of the ghostscript guys that makes complete > sense. If you're a single threaded application or command line program > using lcms that argument breaks down somewhat. Actually those are affected as well. Just imagine you have a daemon running in the background and calling lcms .so across a THR function. This program has set its own memory management and passes some pointers across the user data of THR. Then you run a command line, that also makes use of plug-ins and THR. Guess what? the callbacks got destroyed and then the daemon crashes suddenly without any trace of what happening. This is is real issue. I got some reports of that. And there is no way to solve it other than using static libraries or use some context handling like the one I have introduced in this release. Now you say you are not happy with the guessing of what is and what is not a valid user data. This is *THE* issue. If we could figure out how to solve that, we could provide automatic ABI compatibility and get rid of all pain of .soname bump, but I have not been able, at least not yet. Any ideas would really been appreciated. The problem is how to identify a cmsContext and differentiate from a user-defined pointer wide data. Valgrid complains and I'm concerned about that, but in some cases it keeps working. Fixing the cases it does not work is actually my first headache. Regards Marti -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
On 13/02/2014 11:48, Richard Hughes wrote: > On 13 February 2014 12:35, wrote: >> 1) Any client using THR functions and the lib as shared object >>is basically broken. if a client sets a listener or plug-in, >>it got events from any other clients of the .so, with >>obviously unexpected user data format. This causes segfaults. > > Right, and in the case of the ghostscript guys that makes complete > sense. If you're a single threaded application or command line program > using lcms that argument breaks down somewhat. No. Ghostscript as supplied by us is statically linked with a private copy of lcms2. We don't suffer from the problem (unless people use us as a lib and also call lcms2). However distros insist on going against our advice and changing our code to work with shared libs. (There is a flame war to be had here, so let's not go down that route now). If you're a single threaded application or command line program using lcms *as a shared library* you are absolutely in the firing line for the bug described above. > Okay, I agree. But you can't pretend you're not breaking ABI by fixing > bugs in the API. The argument "this was broken for some users" doesn't > mean you can break it for most users. I disagree with your characterisation of the change. A truer one would be "the existing code was broken for all users of the shared library in a way that will cause (possibly) infrequent but catastrophic failures in way that will be exceptionally hard to detect and debug" whereas "the new code gives obvious repeatable crashes indicating that you should fix the problem". Personally, I have to say that I dislike the 'magically detect small integer values' hack. I'd vote for ditching it if that's the thing that's causing problems. >> I agree a .soname bump should be required here. I can even >> do a major version bump to lcms2-3.0, your feedback would >> be appreciated. > > Well, you *have* to bump LT_REVISION and I would argue that LT_CURRENT > is required as well. Of course, if you bump LT_CURRENT then world and > dog will want liblcms2.so.3 parallel installable with liblcms2.so.2. > It's not that hard to package the two versions in parallel. Whether it > should be called lcms3 is another issue altogether. Possibly a stupid question, but could we build the current library twice? Once with the CMS_CONTEXT_IN_LEGACY_MODE to give liblcms2.so.2 and once without to give liblcms2.so.3 ? Robin -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
On 13 February 2014 12:35, wrote: > 1) Any client using THR functions and the lib as shared object > is basically broken. if a client sets a listener or plug-in, > it got events from any other clients of the .so, with > obviously unexpected user data format. This causes segfaults. Right, and in the case of the ghostscript guys that makes complete sense. If you're a single threaded application or command line program using lcms that argument breaks down somewhat. > 3) Some cases (small integers, pointers to structures) are > detected automatically. Those cases were NOT WORKING > previously because rule 1) and now are fixed. They might be detected automatically in most cases, but if you try to run valgrind on any program using the new version of lcms you get: ==2376== More than 1000 total errors detected. I'm not reporting any more. ==2376== Final error counts will be inaccurate. Go fix your program! > So basically this is breaking the ABI compatibility, but the > cases where ABI is broken were not working anyway. So hence > the decision of fixing the whole thing at the expense of ABI > compatibility. Okay, I agree. But you can't pretend you're not breaking ABI by fixing bugs in the API. The argument "this was broken for some users" doesn't mean you can break it for most users. > I agree a .soname bump should be required here. I can even > do a major version bump to lcms2-3.0, your feedback would > be appreciated. Well, you *have* to bump LT_REVISION and I would argue that LT_CURRENT is required as well. Of course, if you bump LT_CURRENT then world and dog will want liblcms2.so.3 parallel installable with liblcms2.so.2. It's not that hard to package the two versions in parallel. Whether it should be called lcms3 is another issue altogether. Richard. -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
Hi Richard, Much has been discussed about this new functionality and the impact it will surely have on yet existing apps using THR functions. The main drivers I used to take the decision were: 1) Any client using THR functions and the lib as shared object is basically broken. if a client sets a listener or plug-in, it got events from any other clients of the .so, with obviously unexpected user data format. This causes segfaults. 2) Anybody using the library as static can use the flag to revert to old behavior. Otherwise the compiler issues a warning on places where things have changed. 3) Some cases (small integers, pointers to structures) are detected automatically. Those cases were NOT WORKING previously because rule 1) and now are fixed. So basically this is breaking the ABI compatibility, but the cases where ABI is broken were not working anyway. So hence the decision of fixing the whole thing at the expense of ABI compatibility. I agree a .soname bump should be required here. I can even do a major version bump to lcms2-3.0, your feedback would be appreciated. Regards Marti -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
Quoting Christian Schmitz : > "make all" builds everything. Can I have a target there which builds > only static library? You may want to use ./configure --disable-shared Regards Marti -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] PhotoShop CMYK on monitor
Hi Victor, > · I create a doc CMYK with color profile Iso. > · I create a doc RGB with color profile Adobe. > · I select color 100% pure cyan. > · I paint the docs with this pure cyan. > > The results are different in monitor. That is the expected behavior. In the CMYK space this corresponds to a color which is different in RGB space. If you want the same color, use the same Lab values. I.e. crate the CMYK doc, then "convert to profile" and use AdobeRGB as destination. > I´ve used transicc to obtain the color displayed on monitor and it´s the > same in RGB docs but, what is sequence for CMYK docs? To get the same color, take the Lab value and convert it to AdobeRGB. transicc -i ISOnewspaper26v4.icc -o AdobeRGB1998.icc -t1 LittleCMS ColorSpace conversion calculator - 4.2 [LittleCMS 2.06] Enter values, 'q' to quit C? 100 M? 0 Y? 0 K? 0 R=103.6409 G=186.1771 B=234.5724 This is the value of that color in AdobeRGB. Now you may want to use your calibrated display to view that color: transicc -i AdobeRGB1998.icc -t1 -o CalibratedDisplay.icc This can be done in a simple step without going across AdobeRGB transicc -i ISOnewspaper26v4.icc -o CalibratedDisplay.icc -t1 Make sure to use relative colorimetric intent in all paths, this may well be the source of discrepancies you report. Regards Marti -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
On 13 February 2014 11:36, Robin Watts wrote: > Secondly, for people who happen to be using small positive integers for > the cmsContext value, Marti has a horrible hack/"clever piece of > engineering" in there that recognises this case and works around it. Sure, and I fully agree the number of people going to be using integer values in the callback should be very small, but this does not fix the problem with passing the address of a small struct and valgrind issuing hundreds of warnings about uninitialised values. At the moment if you ship lcms2 as an update in fedora, colord crashes at boot and sends an automated abrt bug to the bugtracker against the colord component. As the backtraces are similar, but not the same, the bugs won't be auto-duped. I'm sure colord isn't the only app that using the _THR() functions for it's own purposes. I'm scrambling to convert the colord codebase to the new API so I can issue an unplanned-update along with the lcms2 update. > If you're resigning yourself to adding a new call to the code, you might > as well just change to the newer context handling. Well, my point was that without this new runtime method we'd use the old ABI, although I agree what you say about the global variable thing. If Marti does go with an API bump, it might be a good time to get rid of the cruft, i.e. remove cmsOpenProfileFromMemTHR and just have a cmsOpenProfileFromMem() with a cmsContext parameter. If there's no API bump to be done, we need to communicate this much better to lcms2 consumers and give them time to test against the new ABI. FWIW, a soname bump would be a huge pain for the distros as there is a ton of stuff all depending on lcms2 that needs rebuilding and testing, but possibly preferable than apps and services randomly crashing. Richard -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
On 13/02/2014 10:18, Richard Hughes wrote: > On 13 February 2014 00:01, wrote: > I've run the colord test suite against the new lcms2. There are a lot > of compiler warnings now like this: > > In file included from cd-create-profile.c:27:0: > /usr/include/lcms2.h:1568:14: note: expected ‘cmsContext’ but argument > is of type ‘struct CdIcc *’ > CMSAPI cmsHPROFILE CMSEXPORT cmsCreate_sRGBProfileTHR(cmsContext > ContextID); That's because the meaning of the 'cmsContext' has now changed in this new version. Previously cmsContext was 'any opaque void * value that the caller wanted to provide'. Now the cmsContext is a pointer to a (private) library defined structure that holds the library state. One element of this structure is a userdata pointer that is 'any opaque void * value that the caller wanted to provide'. This change in behaviour is unfortunate but is necessary to solve some nasty issues with threading and/or with multiple callers to the same shared library. This means that any code that uses the old THR functions will need to be updated. The update is not hard, but I appreciate this isn't much solace to people whose code now fails. The only thing I can say is that if you were using the old THR functions in a shared library build, then there was every possibility that it'd end up crashing anyway due to interference between callers. To mitigate against this, 2 things have been done. Firstly, people can build the library with CMS_CONTEXT_IN_LEGACY_MODE and they will get the old behaviour. Hopefully people should only do this for static library builds. Secondly, for people who happen to be using small positive integers for the cmsContext value, Marti has a horrible hack/"clever piece of engineering" in there that recognises this case and works around it. > What might be a better thing to do is have a global function > cmsSetContextMode() which enables the new functionality at runtime > *if* the project has ported to the new cmsCreateContext() code. The > alternative is you have to bump the soname. Sorry to be grumpy. A global function to set a global state would require a global variable. This would entirely break the whole intention of this work which is enable multiple callers to be able to use the same library independently. If you're resigning yourself to adding a new call to the code, you might as well just change to the newer context handling. A .soname bump might be nice though, yes. That's Martis call. Robin -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Release candidate of lcms2-2.6 now available
On 13 February 2014 00:01, wrote: > Please feel free to download and check the CMM in your application I've run the colord test suite against the new lcms2. There are a lot of compiler warnings now like this: In file included from cd-create-profile.c:27:0: /usr/include/lcms2.h:1568:14: note: expected ‘cmsContext’ but argument is of type ‘struct CdIcc *’ CMSAPI cmsHPROFILE CMSEXPORT cmsCreate_sRGBProfileTHR(cmsContext ContextID); This is the backtrace, which isn't always the same: /colord/icc{clear}: Program received signal SIGSEGV, Segmentation fault. __GI___libc_free (mem=0x140) at malloc.c:2892 2892 if (chunk_is_mmapped(p)) /* release mmapped memory. */ Missing separate debuginfos, use: debuginfo-install gvfs-1.18.3-2.fc20.x86_64 lcms2-2.6-999.60.20140213git.fc20.x86_64 libbluray-0.5.0-2.fc20.x86_64 libffi-3.0.13-5.fc20.x86_64 libgcc-4.8.2-7.fc20.x86_64 libselinux-2.2.1-6.fc20.x86_64 pcre-8.33-4.fc20.x86_64 systemd-libs-208-9.fc20.x86_64 xz-libs-5.1.2-6alpha.fc20.x86_64 (gdb) bt #0 __GI___libc_free (mem=0x30) at malloc.c:2892 #1 0x7724473b in cmsMLUfree (mlu=0x65e3a0) at cmsnamed.c:286 #2 0x77231e43 in cmsCloseProfile (hProfile=0x62c810) at cmsio0.c:1393 #3 0x77bc052c in cd_icc_finalize (object=0x63b380) at cd-icc.c:4404 #4 0x76a76fcb in g_object_unref (_object=0x63b380) at gobject.c:3197 #5 0x0040cf22 in colord_icc_clear_func () at cd-test-private.c:1168 #6 0x7659f5e1 in test_case_run (tc=0x6242a0) at gtestutils.c:2067 #11 0x00405acc in main (argc=1, argv=0x7fffdd88) at cd-test-private.c:2091 This test case is creating model mluc tag in a simple V4 profile. I'm slightly confused about the new context work after reading the docs. This program fails: //gcc -o test test.c `pkg-config --cflags --libs lcms2` && ./test #include #include int main(int argc, char *argv[]) { cmsHPROFILE p; void *myuserdata = 0x12345; p = cmsCreate_sRGBProfileTHR (myuserdata); cmsCloseProfile(p); return 0; } i.e. any program that's been using the _THR() functions with their own static userdata rather than using the new cmsCreateContext() is going to explode with: Program received signal SIGSEGV, Segmentation fault. _cmsGetContext (ContextID=0x12345) at cmsplugin.c:673 673if (ctx ->Magic != cmsContextMagicNumber) i.e. you're trying to dereference ctx when it's not a memory location. The same thing happens when trying to read Magic from a small struct (which all of the GObject programs typically are): typedef struct { int test; } teststruct; int main(int argc, char *argv[]) { cmsHPROFILE p; teststruct ctx; p = cmsCreate_sRGBProfileTHR (&ctx); cmsCloseProfile(p); return 0; } gives 43 *different* versions of this in valgrind: ==14270== Conditional jump or move depends on uninitialised value(s) ==14270==at 0x4E4F02F: _cmsGetContext (cmsplugin.c:673) ==14270==by 0x4E4F0B0: _cmsContextGetClientChunk (cmsplugin.c:694) ==14270==by 0x4E40AEA: _cmsFree (cmserr.c:286) ==14270==by 0x4E48EAB: cmsCloseProfile (cmsio0.c:1406) ==14270==by 0x40072A: main (in /home/hughsie/Code/colord/lib/colord/test) I'm _really_not_happy_ with the guessing in _cmsGetContext as it's going to blow-up in hard-to-detect ways. CMS_CONTEXT_IN_LEGACY_MODE doesn't work in this case as it's only affecting the compile warning, rather than the underlying ABI issue. I guess the new functioanlity could be worked around without the soname bump if you could compile the *library* with CMS_CONTEXT_IN_LEGACY_MODE (rather than the user program) although I was slightly surprised at the need to define a new #ifdef to have the old behaviour. In Fedora I guess we'd have to just do -DCMS_CONTEXT_IN_LEGACY_MODE=1 when compiling lcms2, and patch '#define CMS_CONTEXT_IN_LEGACY_MODE' into the top of lcms2.h which probably makes the ghostscript guys sad. The alternative means we anything using _THR() crashes and when valgrinding we get thousands of invalid reads from deep in the lcms2 library. What might be a better thing to do is have a global function cmsSetContextMode() which enables the new functionality at runtime *if* the project has ported to the new cmsCreateContext() code. The alternative is you have to bump the soname. Sorry to be grumpy. Richard. -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
[Lcms-user] PhotoShop CMYK on monitor
Hi. I´m using Little cms to show CMYK profiles on monitor. I´ve used PhotoShop to compare the results and I found differences between a document created in RGB and CMYK color spaces. My configuration in PhotoShop is: · RGB: AdobeRGB1998 · CMYK: IsoNewsPaper26v4 My PhotoShop steps are: · I create a doc CMYK with color profile Iso. · I create a doc RGB with color profile Adobe. · I select color 100% pure cyan. · I paint the docs with this pure cyan. The results are different in monitor. I´ve used transicc to obtain the color displayed on monitor and it´s the same in RGB docs but, what is sequence for CMYK docs? To obtain the same color showed in monitor in RGB doc I use this sequence: transicc -i IsoNewsPaper26v4.icc -o AdobeRgb1998.icc transicc -i AdobeRgb1998.icc -o CalibratedDisplay... How can I obtain the same color showed in CMYK doc? I´ve used different possibilities: transicc -i IsoNewsPaper26v4.icc -o CalibratedDisplay... transicc -i IsoNewsPaper26v4.icc -o CalibratedDisplay... -p IsoNewsPaper26v4.icc etc... I´m driving me crazy with this subject. Thanks. -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user