I'm looking for an xpm icon to use as a placeholder until I make something better.

Are there any linux command line tools that create blank images of specified dimensions? Like people use touch to create blank text files.

link|improve this question

50% accept rate
1  
This is not a programming question. – unwind Jun 9 '11 at 9:01
feedback

migrated from stackoverflow.com Jun 9 '11 at 9:52

This question came from our site for professional and enthusiast programmers.

5 Answers

up vote 8 down vote accepted

The convert command from ImageMagick can be used: convert -size 32x32 xc:white empty.jpg will create a 32x32 image using a white background. convert -size 32x32 xc:transparent empty2.jpg will create it with transparent background.

link|improve this answer
To specify the DPI setting, use the -density 96 switch. imagemagick.org/script/command-line-options.php?#density – trismarck Mar 18 at 3:46
feedback

ImageMagick's convert can do this.

link|improve this answer
feedback

Here you go:

http://www.imagemagick.org/Usage/canvas/

Imagemagick does it all for you. You can specify size, colour and filetype. Also you can put it through 'passthru' or 'exec' in your code or run the php module version.

link|improve this answer
feedback

You can use convert -size 123x456 xc:white x.png. convert is part of ImageMagick.

link|improve this answer
feedback

May be this article Graphics from the command line helpful for you

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.