[Lcms-user] UBSAN reporting errors in libcms

2016-04-20 Thread Aaron Boxer
/testDetails.php?test=24434785&build=946319 One caveat - OpenJPEG runs an older version of lcms, so you folks may have fixed this issue already Kind Regards, Aaron Boxer -- Find and fix application performance issues faster

[Lcms-user] Apply profile with PCS = cmsSigXYZData, Color Space = cmsSigGrayData

2017-02-19 Thread Aaron Boxer
Hello, I have a jpeg 2000 file with an ICC profile. PCS is cmsSigXYZData and color space is cmsSigGrayData. The file can be found here: https://github.com/GrokImageCompression/grok/issues/38 I am working on a library that decodes the jpeg 2000 file and applies the ICC profile, using LCMS. Curr

Re: [Lcms-user] Apply profile with PCS = cmsSigXYZData, Color Space = cmsSigGrayData

2017-02-20 Thread Aaron Boxer
7;m not understanding at all what you're trying to accomplish. > > > > -Noel > > > > > > *From:* Aaron Boxer [mailto:boxe...@gmail.com] > *Sent:* Mon, February 20, 2017 1:04 AM > *To:* lcms-user@lists.sourceforge.net > *Subject:* [Lcms-user] Apply profile w

Re: [Lcms-user] Apply profile with PCS = cmsSigXYZData, Color Space = cmsSigGrayData

2017-02-20 Thread Aaron Boxer
Thanks, Noel. That is a good point. For TIFF, I can store the profile in the TIFF file, and avoid transforming. For other formats, such as PNG, I would need to transform. On Mon, Feb 20, 2017 at 11:49 AM, Noel Carboni < ncarb...@prodigitalsoftware.com> wrote: > > Thanks, Noel. This is not for dis

Re: [Lcms-user] Apply profile with PCS = cmsSigXYZData, Color Space = cmsSigGrayData

2017-02-20 Thread Aaron Boxer
t; > hProfile = cmsCreateGrayProfileTHR(DbgThread(), cmsD50_xyY(), Curve); > cmsFreeToneCurve(Curve); > > return hProfile; > } > > Regards > > Marti > > > On 20/02/2017 17:33, Aaron Boxer wrote: > > Thanks, Marti. Is the white point and transfer function no

Re: [Lcms-user] Apply profile with PCS = cmsSigXYZData, Color Space = cmsSigGrayData

2017-02-20 Thread Aaron Boxer
cmsHPROFILE Create_Gray22(void) > { > cmsHPROFILE hProfile; > cmsToneCurve* Curve = cmsBuildGamma(0, 2.2); > if (Curve == NULL) return NULL; > > hProfile = cmsCreateGrayProfileTHR(0, cmsD50_xyY(), Curve); > cmsFreeToneCurve(Curve); > > return hProfile; >

Re: [Lcms-user] Apply profile with PCS = cmsSigXYZData, Color Space = cmsSigGrayData

2017-02-20 Thread Aaron Boxer
Noel, thank you! I am beginning to understand. Currently, in my design, the user cannot specify the colour space that they will save the data in. I think this needs to be implemented. Currently, we always assume sRGB. But, for grayscale, this may not be the best approach, as you mentioned. Follow

Re: [Lcms-user] Apply profile with PCS = cmsSigXYZData, Color Space = cmsSigGrayData

2017-02-20 Thread Aaron Boxer
olor space. Windows has > been described as embracing "sRGB by default", for example. But that's up > to you. > > > > If you are anticipating prompting the user for target color space > information, then that could resolve the problem. > > > > -Noe

Re: [Lcms-user] Apply profile with PCS = cmsSigXYZData, Color Space = cmsSigGrayData

2017-02-21 Thread Aaron Boxer
te the ICC profile. > > > > Marco > > > > *Von:* Noel Carboni [mailto:ncarb...@prodigitalsoftware.com] > *Gesendet:* Montag, 20. Februar 2017 13:03 > *An:* 'Aaron Boxer' > *Cc:* lcms-user@lists.sourceforge.net > *Betreff:* Re: [Lcms-user] Apply profile with PCS = cmsSigXYZDa

Re: [Lcms-user] Apply profile with PCS = cmsSigXYZData, Color Space = cmsSigGrayData

2017-02-21 Thread Aaron Boxer
(of which libpng specification basically says “leave them > alone unless you know exactly what you are doing” – I didn’t so I left them > at defaults). > > > > Marco > > > > > > *Von:* Marco Freudenberger > *Gesendet:* Dienstag, 21. Februar 2017 10:45 > *

Re: [Lcms-user] Apply profile with PCS = cmsSigXYZData, Color Space = cmsSigGrayData

2017-02-21 Thread Aaron Boxer
> > On Tue, Feb 21, 2017 at 1:15 PM, Marco Freudenberger entrustdatacard.com> wrote: > >> No. I’m actually talking about images that do not have an ICC profile >> embedded. Well – maybe all, actually. >> >> >> >> Lines 187-191: >> >> >> >> if( !png_get_gAMA(png, info, &gamma)) >> >> ga

Re: [Lcms-user] Apply profile with PCS = cmsSigXYZData, Color Space = cmsSigGrayData

2017-02-22 Thread Aaron Boxer
cially like “convert everything to sRGB” if I > remember correctly. > > > > https://github.com/freudi74/mfimage > Cool project! Thanks for sharing this. > > *Von:* Marco Freudenberger > *Gesendet:* Dienstag, 21. Februar 2017 14:51 > *An:* 'Aaron Boxer' > *C

Re: [Lcms-user] Apply profile with PCS = cmsSigXYZData, Color Space = cmsSigGrayData

2017-02-22 Thread Aaron Boxer
On Tue, Feb 21, 2017 at 3:51 PM, Marco Freudenberger wrote: > Well, if you set BOTH gammas to 2.2, it should work. > > > > What test cases do you have and what are the expected results? > Unit tests compare decoded image with reference image, which were probably decoded with gamma=1.0 configurat

[Lcms-user] ICC Monochrome Input Profile and alpha

2017-02-27 Thread Aaron Boxer
Not directly related to lcms, but I have a question about the Monochrome Input Profile: is it valid to have an image with this profile, and to also have an alpha channel ? Thanks, Aaron -- Check out the vibrant tech commun

Re: [Lcms-user] ICC Monochrome Input Profile and alpha

2017-02-27 Thread Aaron Boxer
. for passing alpha > channel data through unchanged). That reduced the application code needed > to handle RGBA and GA data if transforms are not done in place (i.e., from > one buffer to another). > > > > -Noel > > > > *From:* Aaron Boxer [mailto:boxe...@gmail.com] >

[Lcms-user] Extract name from ICC profile

2017-02-27 Thread Aaron Boxer
Hello Again, What is the best way of using lcms to extract an ICC profile name? Thanks so much, Aaron -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/sl

Re: [Lcms-user] Extract name from ICC profile

2017-02-27 Thread Aaron Boxer
> > > > Note that you might want to check if the profile name is available a > certain language…. > > You also could directly store it to a pre-sized std::wstring rather than > the unique_ptr; I don’t remember why Idid it that way. > > > > Marco > > > >

Re: [Lcms-user] Extract name from ICC profile

2017-02-27 Thread Aaron Boxer
ding libpng/the PNG specification expects). > > > > This is a bit off-topic for lcms J You should find plenty of options on > google. > Got it. Thanks again. Aaron *Von:* Aaron Boxer [mailto:boxe...@gmail.com] > *Gesendet:* Montag, 27. Februar 2017 10:20 > *An:

[Lcms-user] PNG, Gamma and JPEG 2000

2017-04-07 Thread Aaron Boxer
Hello, Sorry, this is a bit off topic, but does anyone have an opinion about the following situation: Suppose I want to compress a PNG image to JPEG 2000, where the PNG has gamma correction. JPEG 2000 has no way of storing gamma correction, apparently. Should I just ignore gamma, or try to apply

[Lcms-user] Static analysis warning

2017-04-26 Thread Aaron Boxer
I get this warning on the latest master when running VS 2015 static analyzer: cmsplugin.c(967): warning C28182: Dereferencing NULL pointer. 'prev' contains the same NULL value as '_cmsContextPoolHead' did. -- Check out the

[Lcms-user] Build warnings on OSX / clang

2017-07-23 Thread Aaron Boxer
Hello, Just wanted to report a few warnings I am getting when building with clang. http://my.cdash.org/viewBuildError.php?type=1&buildid=1257347 For example: grok/thirdparty/liblcms2/src/cmsgamma.c:143:32: warning: implicit conversion changes signedness: 'cmsUInt32Number' (aka 'unsigned int') to

Re: [Lcms-user] Build warnings on OSX / clang

2017-07-24 Thread Aaron Boxer
o if you activate > -Wsign-conversion you will get some warnings. > > This not set in the included build system. > > Regards > > Marti > > On 7/24/2017 3:16 AM, Aaron Boxer wrote: > > Hello, > Just wanted to report a few warnings I am getting when building with cla

Re: [Lcms-user] Build warnings on OSX / clang

2017-07-24 Thread Aaron Boxer
> Thanks. I've turned on this warning in my build because the implicit >> conversion can cause >> hard-to-trace bugs. >> > > Inappropriate explicit casts in the C code can also cause hard-to-trace > bugs and explicit casts should be minimized. I think that usually implicit > type conversion should

Re: [Lcms-user] Build warnings on OSX / clang

2017-07-24 Thread Aaron Boxer
Thanks to Noel for offering fixes, and to Marti for graciously accepting :) I've gone through similar issues with my JPEG 2000 codec, much of the code inherited from developers who didn't worry about these issues. I spent a lot of time converting signed to unsigned for all quantities that must al

Re: [Lcms-user] Build warnings on OSX / clang

2017-07-26 Thread Aaron Boxer
rent systems > with different compilers. Marti, you may want to review the code and > decide whether to change it or suppress the warning: > > > > ..\..\..\src\cmsxform.c(799): warning C4191: 'type cast': unsafe > conversion from '_cmsTransform2Fn&#x

[Lcms-user] .gitignore file

2017-07-26 Thread Aaron Boxer
Hello Marti, I noticed you don't have a .gitignore file in your repo. I've attached one that may be useful for the project: it filters out binaries and other artifacts produced while building. Cheers, Aaron .gitignore Description: Binary data

[Lcms-user] OSX Warnings

2017-08-02 Thread Aaron Boxer
Thanks to Noel and Marti for these improvements ! On OSX, my warning count has gone from 20 to 2. Here are the two remaining warnings: http://my.cdash.org/buildSummary.php?buildid=1262991 Aaron -- Check out the vibrant