Thanks a lot for help! When I convert with Photoshop to sRGB / Absolute Colorimetric, I get different colors than I get from lcms. Example: At xy(268, 190) I get RGB(0,163,77) in Photoshop, but RGB(77, 164, 1) in lcms. Both images are opened in Photoshop for picking the colors.
I noticed the color shifts in the border areas, too, but the difference is much bigger there than the difference generated by different positions on the screen. Code is pretty simple: QImage* image = new QImage("/Users/ar/Desktop/basICColor_CM-Ampel.jpeg"); cmsHPROFILE hInProfile, hOutProfile; cmsHTRANSFORM hTransform; hInProfile = cmsOpenProfileFromFile("/Users/ar/Desktop/ampel.icc", "r"); hOutProfile = cmsOpenProfileFromFile("/System/Library/ColorSync/Profiles/sRGB Profile.icc", "r"); hTransform = cmsCreateTransform(hInProfile, TYPE_BGR_8, hOutProfile, TYPE_BGR_8, INTENT_ABSOLUTE_COLORIMETRIC, 0); cmsCloseProfile(hInProfile); cmsCloseProfile(hOutProfile); uchar *rgbOutTemp = new uchar[(image->width() * image->height()) * 3]; uchar *rgbInTemp = new uchar[(image->width() * image->height()) * 3]; int j = 0; for(int y = 0; y < image->height(); y++){ for(int x = 0; x < image->width(); x++){ QColor col = image->pixel(x, y); rgbInTemp[j] = col.blue(); rgbInTemp[j + 1] = col.green(); rgbInTemp[j + 2] = col.red(); j += 3; } } cmsDoTransform(hTransform,rgbInTemp,rgbOutTemp,image->width()*image->height()); QImage* imout = new QImage(image->width(), image->height(), QImage::Format_RGB32); int s = 0; for(int h = 0; h < imout->height(); h++){ for(int w = 0; w < imout->width(); w++){ QColor color(rgbOutTemp[s], rgbOutTemp[s+1], rgbOutTemp[s+2]); imout->setPixel(w, h, color.rgb()); s+=3; } } ui->label->setPixmap(QPixmap::fromImage(*imout)); imout->save("/Users/ar/Desktop/saved.jpg","JPG",100); Regards Andreas Am 27.09.2012 um 20:31 schrieb Marti Maria <marti.ma...@littlecms.com>: > > Hi Andreas, > > I have tested your image with PS CS4 and get 1 digital count of deviation of > PhotoShop, which is due to the way different CMM do rounding. I can see no > differences in color. > > Could you please detail the steps you follow to get different results? > > Thanks > Marti. > > > El 27/09/2012 19:37, Andreas Rettig escribió: >> Hello, >> >> I'm trying to make my first steps with LCMS and build a very simple >> application to get familiar with everything. >> All I want to do is transform a RGB-Jpeg from a special input profile to >> sRGB and produce the same results I get when I do exactly the same in >> Photoshop. >> >> I'm using that image for testing with its embedded ICC profile as Input >> profile: >> >> http://www.colormanagement.org/download_files/basICColor_CM-Ampel.jpg >> >> Then I do a simple transformation from ampel.icc -> sRGB.icc, with different >> intents. >> The results are always a little different from what I can produce in >> Photoshop (using the same profiles and the same intent). >> >> The traffic light is green after the transformation, which shows me that it >> roughly works - but I expect to get exactly the same result. >> >> The same happens in Gimp - it's always a little different from what I get >> through lcms (I saved the results to a file and checked RGB-Values). >> Especially these grids at the borders have very different colors. >> >> Sourcecode is more or less from the examples, nothing special. Profiles are >> the exactly the same in lcms and Photoshop. >> >> Regards >> Andreas >> >> >> ------------------------------------------------------------------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://ad.doubleclick.net/clk;258768047;13503038;j? >> http://info.appdynamics.com/FreeJavaPerformanceDownload.html >> >> >> _______________________________________________ >> Lcms-user mailing list >> Lcms-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/lcms-user >
smime.p7s
Description: S/MIME cryptographic signature
------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user