| OLD | NEW |
| 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 4185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4196 if (Offsets == NULL) { | 4196 if (Offsets == NULL) { |
| 4197 | 4197 |
| 4198 _cmsFree(self ->ContextID, Matrix); | 4198 _cmsFree(self ->ContextID, Matrix); |
| 4199 return NULL; | 4199 return NULL; |
| 4200 } | 4200 } |
| 4201 | 4201 |
| 4202 for (i=0; i < nElems; i++) { | 4202 for (i=0; i < nElems; i++) { |
| 4203 | 4203 |
| 4204 cmsFloat32Number v; | 4204 cmsFloat32Number v; |
| 4205 | 4205 |
| 4206 if (!_cmsReadFloat32Number(io, &v)) return NULL; | 4206 if (!_cmsReadFloat32Number(io, &v)) { |
| 4207 _cmsFree(self ->ContextID, Matrix); |
| 4208 _cmsFree(self ->ContextID, Offsets); |
| 4209 return NULL; |
| 4210 } |
| 4207 Matrix[i] = v; | 4211 Matrix[i] = v; |
| 4208 } | 4212 } |
| 4209 | 4213 |
| 4210 | 4214 |
| 4211 for (i=0; i < OutputChans; i++) { | 4215 for (i=0; i < OutputChans; i++) { |
| 4212 | 4216 |
| 4213 cmsFloat32Number v; | 4217 cmsFloat32Number v; |
| 4214 | 4218 |
| 4215 if (!_cmsReadFloat32Number(io, &v)) return NULL; | 4219 if (!_cmsReadFloat32Number(io, &v)) { |
| 4220 _cmsFree(self ->ContextID, Matrix); |
| 4221 _cmsFree(self ->ContextID, Offsets); |
| 4222 return NULL; |
| 4223 } |
| 4216 Offsets[i] = v; | 4224 Offsets[i] = v; |
| 4217 } | 4225 } |
| 4218 | 4226 |
| 4219 | 4227 |
| 4220 mpe = cmsStageAllocMatrix(self ->ContextID, OutputChans, InputChans, Matrix,
Offsets); | 4228 mpe = cmsStageAllocMatrix(self ->ContextID, OutputChans, InputChans, Matrix,
Offsets); |
| 4221 _cmsFree(self ->ContextID, Matrix); | 4229 _cmsFree(self ->ContextID, Matrix); |
| 4222 _cmsFree(self ->ContextID, Offsets); | 4230 _cmsFree(self ->ContextID, Offsets); |
| 4223 | 4231 |
| 4224 *nItems = 1; | 4232 *nItems = 1; |
| 4225 | 4233 |
| (...skipping 1336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5562 | 5570 |
| 5563 for (pt = SupportedTags; | 5571 for (pt = SupportedTags; |
| 5564 pt != NULL; | 5572 pt != NULL; |
| 5565 pt = pt ->Next) { | 5573 pt = pt ->Next) { |
| 5566 | 5574 |
| 5567 if (sig == pt -> Signature) return &pt ->Descriptor; | 5575 if (sig == pt -> Signature) return &pt ->Descriptor; |
| 5568 } | 5576 } |
| 5569 | 5577 |
| 5570 return NULL; | 5578 return NULL; |
| 5571 } | 5579 } |
| OLD | NEW |