matthewwithanm / django-imagekit

Automated image processing for Django. Currently v4.0
http://django-imagekit.rtfd.org/
BSD 3-Clause "New" or "Revised" License
2.24k stars 276 forks source link

Using ResizeToFill and ResizeToFit changes colors of JPEG #564

Open rbosch opened 1 year ago

rbosch commented 1 year ago

Great package!

I hope someone can help. Doing some very basic resizing. But for some JPG files there are color difference between the original and the resized image when using ResizeToFill and ResizeToFit.

test = ImageSpecField(
        source="filename",
        processors=[ResizeToFill(1024, 768)],
        format="JPEG",
        options={"quality": 100},
)

Is there any option I'm missing that would fix this?

Thx!

vstoykov commented 9 months ago

The resizing processors don't have information about changing colors. Only if you use ResizeToFit or ResizeCanvas you can pass color but this is for the background.

Can you give us a sample of original image and the resized image with changed colors to see what you mean?