Bug: Only YUV color space input jpeg is supported
igoradamenko opened this issue · comments
I used Optimizt to compress the image. Sadly, I don't have an original version, but it was something like this:
Then I run Optimizt once again, and the compressed image triggered this error:
✖ 118.jpg
Command failed: /home/ai/.npm-global/lib/node_modules/@funboxteam/optimizt/node_modules/guetzli/vendor/guetzli --quality 90 /tmp/58840c0a-cf60-4c6d-a314-76189370802f /tmp/41a60157-361d-4d00-909b-2f2257eadde0
Only YUV color space input jpeg is supported
Guetzli processing failed
It looks like Optimizt does not support images it creates 🤔
The image that triggers this error is here:
(Archives are named the same, but there are different images.)
Looks like sometimes Guetzli is changing color space for processed images google/guetzli#196.
Also Guetzli assumes “that input is in sRGB profile”.
So, the only thing we can do is check the color space of the image and convert it to sRGB if necessary 🤷♂️