Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Side by Side Diff: third_party/lcms2-2.6/src/cmsvirt.c

Issue 2545553002: Make LCMS2 source files utf-8 (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/lcms2-2.6/src/cmstypes.c ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //------------------------------------------------------------------------------ --- 1 //------------------------------------------------------------------------------ ---
2 // 2 //
3 // Little Color Management System 3 // Little Color Management System
4 // Copyright (c) 1998-2014 Marti Maria Saguer 4 // Copyright (c) 1998-2014 Marti Maria Saguer
5 // 5 //
6 // Permission is hereby granted, free of charge, to any person obtaining 6 // Permission is hereby granted, free of charge, to any person obtaining
7 // a copy of this software and associated documentation files (the "Software"), 7 // a copy of this software and associated documentation files (the "Software"),
8 // to deal in the Software without restriction, including without limitation 8 // to deal in the Software without restriction, including without limitation
9 // the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 // and/or sell copies of the Software, and to permit persons to whom the Softwar e 10 // and/or sell copies of the Software, and to permit persons to whom the Softwar e
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 605
606 606
607 cmsHPROFILE CMSEXPORT cmsCreateXYZProfile(void) 607 cmsHPROFILE CMSEXPORT cmsCreateXYZProfile(void)
608 { 608 {
609 return cmsCreateXYZProfileTHR(NULL); 609 return cmsCreateXYZProfileTHR(NULL);
610 } 610 }
611 611
612 612
613 //sRGB Curves are defined by: 613 //sRGB Curves are defined by:
614 // 614 //
615 //If R’sRGB,G’sRGB, B’sRGB < 0.04045 615 //If R'sRGB,G'sRGB, B'sRGB < 0.04045
616 // 616 //
617 // R = R’sRGB / 12.92 617 // R = R'sRGB / 12.92
618 // G = G’sRGB / 12.92 618 // G = G'sRGB / 12.92
619 // B = B’sRGB / 12.92 619 // B = B'sRGB / 12.92
620 // 620 //
621 // 621 //
622 //else if R’sRGB,G’sRGB, B’sRGB >= 0.04045 622 //else if R'sRGB,G'sRGB, B'sRGB >= 0.04045
623 // 623 //
624 // R = ((R’sRGB + 0.055) / 1.055)^2.4 624 // R = ((R'sRGB + 0.055) / 1.055)^2.4
625 // G = ((G’sRGB + 0.055) / 1.055)^2.4 625 // G = ((G'sRGB + 0.055) / 1.055)^2.4
626 // B = ((B’sRGB + 0.055) / 1.055)^2.4 626 // B = ((B'sRGB + 0.055) / 1.055)^2.4
627 627
628 static 628 static
629 cmsToneCurve* Build_sRGBGamma(cmsContext ContextID) 629 cmsToneCurve* Build_sRGBGamma(cmsContext ContextID)
630 { 630 {
631 cmsFloat64Number Parameters[5]; 631 cmsFloat64Number Parameters[5];
632 632
633 Parameters[0] = 2.4; 633 Parameters[0] = 2.4;
634 Parameters[1] = 1. / 1.055; 634 Parameters[1] = 1. / 1.055;
635 Parameters[2] = 0.055 / 1.055; 635 Parameters[2] = 0.055 / 1.055;
636 Parameters[3] = 1. / 12.92; 636 Parameters[3] = 1. / 12.92;
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 cmsSetHeaderRenderingIntent(hProfile, xform ->RenderingIntent); 1185 cmsSetHeaderRenderingIntent(hProfile, xform ->RenderingIntent);
1186 1186
1187 cmsPipelineFree(LUT); 1187 cmsPipelineFree(LUT);
1188 return hProfile; 1188 return hProfile;
1189 1189
1190 Error: 1190 Error:
1191 if (LUT != NULL) cmsPipelineFree(LUT); 1191 if (LUT != NULL) cmsPipelineFree(LUT);
1192 cmsCloseProfile(hProfile); 1192 cmsCloseProfile(hProfile);
1193 return NULL; 1193 return NULL;
1194 } 1194 }
OLDNEW
« no previous file with comments | « third_party/lcms2-2.6/src/cmstypes.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698