back to Table of Contents


Common Inputs

All effect functions in this library use a regular set of common inputs. However, some of the effects may also require its specific inputs, which are then noted in the respective effect description.


Image handles

shan& (LONG)

mask& (LONG)

Limit the processing area

minX% (INTEGER)

minY% (INTEGER)

maxX% (INTEGER)

maxY% (INTEGER)

Note these limits are clipped according to the source image boundaries. If you don't need a particular limit, then simply set it to -1. If all limits are -1, then the entire image will be processed, unless a mask image is given.

Common Result

All effect functions in this library do also return the same result on success or an invalid handle on failure, so make sure to check for this.


Image handles

newImg& (LONG)

Failure may be caused by four common reasons:
  1. You did provide an invalid source image handle (>= -1 and <> 0).
  2. The source image was not in 32-bit ARGB mode.
  3. The function could not obtain a new image handle (Out of Memory?).
  4. A given mask image was not in 8-bit (256 colors) mode or did not match the source image size.

The original passed in source images remain unchanged, so you can simply collect all handles of a multiple effect sequence using an array or stack for easy undo/redo operations. That said, means you are responsible to _FREEIMAGE no longer needed images.

Also any passed in mask images remain unchanged and the active _SOURCE and _DEST handles are not changed either by any effects.


back to Table of Contents