How to create a blank new image in Imagemagick via command line?
Using -background
doesn't work:
$ convert -size 800x800 -background white x.png convert: no images defined `x.png' @ error/convert.c/ConvertImageCommand/3257.
convert -size 800x800 xc:white white.png
xc:
used to mean "X Constant Image" but now is just a shorthand for canvas:
. This means you can also use:
convert -size 800x800 canvas:white white.png
and because "white" is the default value if no color is provided, you can also use:
convert -size 800x800 xc: white.png convert -size 800x800 canvas: white.png
If by "blank" you mean "transparent", just use that word as the color:
convert -size 800x800 xc:transparent transparent.png
Answer made possible by ImageMagick v6 Examples and How to create a new image?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With