django-imagekit icon indicating copy to clipboard operation
django-imagekit copied to clipboard

Using ResizeToFill and ResizeToFit changes colors of JPEG

Open rbosch opened this issue 1 year ago • 2 comments

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!

rbosch avatar Jul 05 '23 07:07 rbosch

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?

vstoykov avatar Sep 27 '23 23:09 vstoykov

@rbosch is the problem resolved. Can we close the issue?

vstoykov avatar Jul 22 '24 18:07 vstoykov