Adding whitespace
Posted: 2016-02-14T07:59:58-07:00
What is the best way to add whitespace?
I have an image of 200x150 and it needs to be displayed in a square format (200x200) with 25 pixels whitespace above and below the image to fill out.
The only example I could find first stretches the image to fill the square and then uses the borderimage command to put borders above and below the image. But it seems to me that will both waste a lot of time and deteriorate the quality of the image.
Can some Imagick guru enlighten me on this subject?
I have an image of 200x150 and it needs to be displayed in a square format (200x200) with 25 pixels whitespace above and below the image to fill out.
The only example I could find first stretches the image to fill the square and then uses the borderimage command to put borders above and below the image. But it seems to me that will both waste a lot of time and deteriorate the quality of the image.
Can some Imagick guru enlighten me on this subject?