Fixed indentation by radarhere · Pull Request #8623 · python-pillow/Pillow
| Py_BEGIN_ALLOW_THREADS | |
| // transform color channels only | |
| for (i = 0; i < im->ysize; i++) { | |
| cmsDoTransform(hTransform, im->image[i], imOut->image[i], im->xsize); | |
| } | |
| // lcms by default does nothing to the auxiliary channels leaving those | |
| // unchanged. To do "the right thing" here, i.e. maintain identical results | |
| // with and without inPlace, we replicate those channels to the output. | |
| // | |
| // As of lcms 2.8, a new cmsFLAGS_COPY_ALPHA flag is introduced which would | |
| // do the same thing automagically. Unfortunately, lcms2.8 is not yet widely | |
| // enough available on all platforms, so we polyfill it here for now. | |
| pyCMScopyAux(hTransform, imOut, im); | |
| Py_END_ALLOW_THREADS | |
| return 0; |