Hi,
I have an 400x200 jpg. I want a 800x800 jpg. -resize "800x800!" stretches the image. Is there a way to resize and pad the excess space with white or black so I have an image 800x800 without stretching it?
Can IM resize and pad the image?
Re: Can IM resize and pad the image?
Try the -extent option.
Re: Can IM resize and pad the image?
That was part I was missing. This is the final code that worked for me.
rs = img.Convert("-resize","800x800","-gravity","center","-extent","800x800","input.jpg","output.jpg")
Thanks for all the help
Great software
rs = img.Convert("-resize","800x800","-gravity","center","-extent","800x800","input.jpg","output.jpg")
Thanks for all the help
Great software