This deals with the problem that arises when format-unspecific encoders are provided with parameters that are not present in the final target encoder.
For example, the following call can take place with the quality argument.
// works if $image was created from jpeg, errors if image source is png for example
$encoded = $image->encode(new AutoEncoder(quality: 5));
If the source image and thus the target encoder supports quality (e.g. Jpeg), everything works fine. However, if the input format does not contain quality in the target encoder (e.g. PNG), an error occurs.
Unknown named parameter $quality
The logic has only been adapted since version 3.6, so this does not affect previous versions.
This deals with the problem that arises when format-unspecific encoders are provided with parameters that are not present in the final target encoder.
For example, the following call can take place with the
quality
argument.If the source image and thus the target encoder supports
quality
(e.g. Jpeg), everything works fine. However, if the input format does not containquality
in the target encoder (e.g. PNG), an error occurs.The logic has only been adapted since version 3.6, so this does not affect previous versions.
See #1332