how can draw a null image?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
haibara
Posts: 10
Joined: 2008-05-06T02:30:15-07:00

how can draw a null image?

Post by haibara »

i want a null image, it means rgba be all zero(?)

convert -size heightxwidth -background none {result}?

it seems wrong and infos me lacking of source

what should i do?

regards
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: how can draw a null image?

Post by fmw42 »

try

convert -size 100x100 xc:none out.png

or

convert -size 100x100 xc:"rgba(0,0,0,0)" out.png


see http://www.imagemagick.org/Usage/canvas/#solid in the section on transparent canvas
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: how can draw a null image?

Post by anthony »

Do not confuse what you are calling a null image which was IM generated using null:
That image is special in that it is a single transparent pixel that is used to represent things like, errors, gaps in montage, to two separate image sequences in -layers composite (such as composing animations together).

That image can be saved, but reading a saved null: image will NOT be regarded as the special null: image that IM uses for special purposes (I consider this a bug, but an acceptable one).
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply