null: ??

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
ynguyen
Posts: 12
Joined: 2012-04-11T10:10:29-07:00
Authentication code: 8675308

null: ??

Post by ynguyen »

What is the null: definition?
and
Can you explain what null: meaning to the statement below.

convert text-file2.tif null: overlay.tif -compose multiply -layers composite FINAL.tif


The statemen above is doing what I am looking for. However, I want to under a bit better on how to use null: for effectively.

Thank you.

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

Re: null: ??

Post by fmw42 »

ynguyen wrote:What is the null: definition?
and
Can you explain what null: meaning to the statement below.

convert text-file2.tif null: overlay.tif -compose multiply -layers composite FINAL.tif


The statemen above is doing what I am looking for. However, I want to under a bit better on how to use null: for effectively.

Thank you.

ynguyen

see http://www.imagemagick.org/Usage/anim_mods/#composite

The null: is not needed unless you are trying to composite two animations or multi-frame images.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: null: ??

Post by anthony »

null: is a special image that is typically generated for specific reasons.

As an output format it just means 'throw away the results. Especially for the required 'implied write to the filename' at the end of most IM commands.

For input it is used as a separator for layers compose (as Fred pointed out above)
It is also used in Montage as a 'skip this 'tile'' image... See "Leaving Gaps in a Montage"...
http://www.imagemagick.org/Usage/montage/#null

It is also generated for 'missed crops' when a crop misses the image completely, either because of user inputs, or the virtual canvas effects.
http://www.imagemagick.org/Usage/crop/#crop_missed

Basically a "null:" image is an image to use, when you really do not want a real image, but need one.


You can write a null: image to a image file format, (single transparent pixel image). BUT you can not read that written file back in as a null: image. (Except using a mpc: image memory dump). As such you can not "pipe" a null: image in a image pipeline. At least not in IMv6.



In IMv7 I have made a note to allow a "NULL:" status to be determined by a 'property' rather than a 'magick coder'. this will mean that image file formats (like MIFF:) will be able to save, read, and 'pipe' a null: image. It will also allow you to 'revoke' the status of a null image. :-)
It will be a late addition, most likely during IMv7 beta testing!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply