We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Can you confirm that it's really not possible to add a background color to a transparent png and change the output format to jpg?
On the phpthumb demo page it works... http://phpthumb.sourceforge.net/demo/demo/phpThumb.demo.demo.php#x9
[[phpthumbof? &input=`transparent.png` &options=`bg=FF0000`]]
Result: red background, png. Close, but still a (large) png.
[[phpthumbof? &input=`transparent.png` &options=`bg=FF0000&f=jpg`]]
Result: black background, jpg.
[[phpthumbof? &input=`transparent.png` &options=`bg=FF0000` &useResizer=`0`]]
Result: cropped image (squared, ???), white background, png.
[[phpthumbof? &input=`transparent.png` &options=`bg=FF0000&f=jpg` &useResizer=`0`]]
Result: cropped image (squared, ???), white background, jpg.
The text was updated successfully, but these errors were encountered:
Doing it in 2 steps seems to work, nesting or using toPlaceholder. But this just doesn't feel right...
[[phpthumbof? &input=`[[phpthumbof? &input=`transparent.png` &options=`bg=FF0000`]]` &options=`f=jpg`]]
[[phpthumbof? &input=`transparent.png` &options=`bg=FF0000` &toPlaceholder=`imageWithBg`]] [[phpthumbof? &input=`[[+imageWithBg]]` &options=`f=jpg`]]
Sorry, something went wrong.
I tracked this one down to this line: https://github.com/modxcms/Resizer/blob/master/core/components/resizer/model/vendor/oo12/reductionist/src/Reductionist/Reductionist.php#L411
The check for !$outputIsJpg prevents the creation of a jpg with a background color.
!$outputIsJpg
But why?
No branches or pull requests
Can you confirm that it's really not possible to add a background color to a transparent png and change the output format to jpg?
On the phpthumb demo page it works... http://phpthumb.sourceforge.net/demo/demo/phpThumb.demo.demo.php#x9
Result: red background, png. Close, but still a (large) png.
Result: black background, jpg.
Result: cropped image (squared, ???), white background, png.
Result: cropped image (squared, ???), white background, jpg.
The text was updated successfully, but these errors were encountered: