-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace 5 with $quality - Else quality is always 5 #10
Comments
It's not weird.
Could you explain more details about why you think this default quality is weird? |
@peter279k I was in a hurry when adding this issue. It's not the built in PHP default value that is weird, it's my convert function default value that is weird, or wrong is a better word. When sending a I just need to move the |
@jenstornell, thank you for your explanation. I know that and I think we have to consider/note that some image formats in PHP |
And the function you create should change into following code snippets: function convert($from, $to, $quality = -1) {
$converter = new ImageConverter();
return $converter->convert($from, $to, $quality);
} |
@peter279k Yes. I tested sending a quality argument to a method that did not support it and it will just be ignored, so I think it will be fine out of the box. I think a note about it in the docs will do (maybe that's what you ment?). Also the quality argument differ between formats. Some have 1-100 and others 1-9 etc. Docs would be good not forcing users to go to php.net. Yes, I know how the function will look like. I did not have the time to implement it yesterday, that's why I added an issue instead. |
@jenstornell, thank you for your comment. Perhaps we should have the quality validation before passing the |
✔️ |
It should probably be
$quality
instead of5
.The text was updated successfully, but these errors were encountered: