kirby-colorextractor icon indicating copy to clipboard operation
kirby-colorextractor copied to clipboard

`'mode' => 'both'` resizes image at 1 * 2px

Open apademide opened this issue 5 months ago • 0 comments

I was setting up the plugin and testing the different extraction modes. For some reason, setting 'sylvainjule.colorextractor.mode' => 'both' caused images to be resized to 1 by 2px.

I can't give you extensive context and didn't check all the combinations, but switching to dominant fixed the issue so it might either be caused by both specifically or average on its own. My gut feeling would be that average's logic at some point resizes the image down to 1px to get the color, and actually applies the resize on the original image rather than a copy.

While both was selected, both uploaded images and images on which extractColor was called were resized.

apademide avatar Sep 20 '24 08:09 apademide