| OLD | NEW |
| 1 /* vim: set ts=8 sw=8 noexpandtab: */ | 1 /* vim: set ts=8 sw=8 noexpandtab: */ |
| 2 // qcms | 2 // qcms |
| 3 // Copyright (C) 2009 Mozilla Foundation | 3 // Copyright (C) 2009 Mozilla Foundation |
| 4 // Copyright (C) 1998-2007 Marti Maria | 4 // Copyright (C) 1998-2007 Marti Maria |
| 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 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1264 // or for correlated color temperature (T) between 7000K and 250
00K: | 1264 // or for correlated color temperature (T) between 7000K and 250
00K: |
| 1265 if (T > 7000.0 && T <= 25000.0) { | 1265 if (T > 7000.0 && T <= 25000.0) { |
| 1266 x = -2.0064*(1E9/T3) + 1.9018*(1E6/T2) + 0.24748*(1E3/T)
+ 0.237040; | 1266 x = -2.0064*(1E9/T3) + 1.9018*(1E6/T2) + 0.24748*(1E3/T)
+ 0.237040; |
| 1267 } else { | 1267 } else { |
| 1268 // Invalid tempK | 1268 // Invalid tempK |
| 1269 white_point.x = -1.0; | 1269 white_point.x = -1.0; |
| 1270 white_point.y = -1.0; | 1270 white_point.y = -1.0; |
| 1271 white_point.Y = -1.0; | 1271 white_point.Y = -1.0; |
| 1272 | 1272 |
| 1273 assert(0 && "invalid temp"); | 1273 assert(0 && "invalid temp"); |
| 1274 | |
| 1275 return white_point; | 1274 return white_point; |
| 1276 } | 1275 } |
| 1277 } | 1276 } |
| 1278 | 1277 |
| 1279 // Obtain y(x) | 1278 // Obtain y(x) |
| 1280 | 1279 |
| 1281 y = -3.000*(x*x) + 2.870*x - 0.275; | 1280 y = -3.000*(x*x) + 2.870*x - 0.275; |
| 1282 | 1281 |
| 1283 // wave factors (not used, but here for futures extensions) | 1282 // wave factors (not used, but here for futures extensions) |
| 1284 | 1283 |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1643 { | 1642 { |
| 1644 qcms_profile *profile = NULL; | 1643 qcms_profile *profile = NULL; |
| 1645 FILE *file = _wfopen(path, L"rb"); | 1644 FILE *file = _wfopen(path, L"rb"); |
| 1646 if (file) { | 1645 if (file) { |
| 1647 profile = qcms_profile_from_file(file); | 1646 profile = qcms_profile_from_file(file); |
| 1648 fclose(file); | 1647 fclose(file); |
| 1649 } | 1648 } |
| 1650 return profile; | 1649 return profile; |
| 1651 } | 1650 } |
| 1652 #endif | 1651 #endif |
| OLD | NEW |