shouldImportICC returns true if we need to import ICC profile for the image.
(img *vips.Image)
| 66 | |
| 67 | // shouldImportICC returns true if we need to import ICC profile for the image. |
| 68 | func shouldImportICC(img *vips.Image) bool { |
| 69 | interp := img.GuessInterpretation() |
| 70 | |
| 71 | // Skip ICC import for RGB and grayscale images, since all our operations |
| 72 | // are designed to work in these colorspaces and we don't want to mess with them. |
| 73 | return interp != vips.InterpretationRGB && |
| 74 | interp != vips.InterpretationSRGB && |
| 75 | interp != vips.InterpretationRGB16 && |
| 76 | interp != vips.InterpretationScRGB && |
| 77 | interp != vips.InterpretationGrey16 && |
| 78 | interp != vips.InterpretationBW |
| 79 | } |
no test coverage detected