Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add padding when using imagemagick to convert an EPS into a PNG?

How to add padding when using imagemagick to convert an EPS into a PNG?

I want to do something like:

convert logo.eps -size 128x128 logo.png

But want the actual logo to be 96x96px, centered, surrounded by a transparent background to reach 128x128 pixels.

like image 670
user1680104 Avatar asked Oct 31 '12 08:10

user1680104


1 Answers

found it out myself:

convert logo.eps -background transparent -gravity center -scale 96x96 -extent 128x128 logo.png
like image 131
user1680104 Avatar answered Nov 15 '22 11:11

user1680104