Page 1 of 1

null: ??

Posted: 2012-04-27T13:31:42-07:00
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

Re: null: ??

Posted: 2012-04-27T13:56:39-07:00
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.

Re: null: ??

Posted: 2012-04-30T19:36:21-07:00
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!