Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Resize images with white background using gdn_uploadimage->saveImageAs()
odannyc
New
Hey guys I'm trying to use the method saveImageAs() to resize an image and add a white background to it.
Right now it can upload an image just fine, and resize it and can also crop it.
But lets say I want a squared image of 500x500 and I have an image of 300x600
I want to resize that image down to 200x500 and then add a white backgrond to it to make it 500x500
Anyone know how to do that or modify that method to do it?
0
Comments
You would use css in your custom theme to change the color and the size of the rendered images.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
You can set the max height
saveImageAs($TmpImage,$TargetImage, '500', '')