Intervention / image

PHP Image Processing
https://image.intervention.io
MIT License
13.88k stars 1.5k forks source link

Since 3.6.0 AutoEncoder does not take quality as a constructor parameter #1332

Closed karlomikus closed 5 months ago

karlomikus commented 5 months ago

Describe the bug Not sure if this is breaking change, but if you follow docs, the examples are not correct anymore: https://image.intervention.io/v3/basics/image-output#encoding-images

Code Example The following code is not working anymore:

$encodedImage = $image->encode(new AutoEncoder(quality: 85));

Environment (please complete the following information):

olivervogel commented 5 months ago

Thanks for reporting. Unfortunately I can't reproduce this at the moment. What is the error message you are getting?

karlomikus commented 5 months ago

This happens when I try to encode .png image.

[2024-04-22 14:11:41] local.ERROR: [IMAGE_SERVICE] Unknown named parameter $quality  

I guess this happens because PngEncoder does not have $quality parameter.

olivervogel commented 5 months ago

Ok, I understand the problem. This needs to be adressed, I will look into it.

olivervogel commented 5 months ago

This should be fixed in 3.6.1.

karlomikus commented 5 months ago

I did some tests and they are all passing, thanks!