The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

maskimg.c - implements masked images/image subsets

SYNOPSIS

DESCRIPTION

i_img_mask_ext

A pointer to this type of object is kept in the ext_data of a masked image.

IIM_base_masked

The basic data we copy into a masked image.

i_img_masked_new(i_img *targ, i_img *mask, i_img_dim xbase, i_img_dim ybase, i_img_dim w, i_img_dim h)

Create a new masked image.

The image mask is optional, in which case the image is just a view of a rectangular portion of the image.

The mask only has an effect of writing to the image, the entire view of the underlying image is readable.

pixel access to mimg(x,y) is translated to targ(x+xbase, y+ybase), as long as (0 <= x < w) and (0 <= y < h).

For a pixel to be writable, the pixel mask(x,y) must have non-zero in it's first channel. No scaling of the pixel is done, the channel sample is treated as boolean.

i_destroy_masked(i_img *im)

The destruction handler for masked images.

Releases the ext_data.

Internal function.

i_ppix_masked(i_img *im, i_img_dim x, i_img_dim y, const i_color *pix)

Write a pixel to a masked image.

Internal function.

i_ppixf_masked(i_img *im, i_img_dim x, i_img_dim y, const i_fcolor *pix)

Write a pixel to a masked image.

Internal function.

i_plin_masked(i_img *im, i_img_dim l, i_img_dim r, i_img_dim y, const i_color *vals)

Write a row of data to a masked image.

Internal function.

i_plinf_masked(i_img *im, i_img_dim l, i_img_dim r, i_img_dim y, const i_fcolor *vals)

Write a row of data to a masked image.

Internal function.

i_gpix_masked(i_img *im, i_img_dim x, i_img_dim y, i_color *pix)

Read a pixel from a masked image.

Internal.

i_gpixf_masked(i_img *im, i_img_dim x, i_img_dim y, i_fcolor *pix)

Read a pixel from a masked image.

Internal.

psamp_masked()

i_psamp() implementation for masked images.

psampf_masked()

i_psampf() implementation for masked images.

AUTHOR

Tony Cook <tony@develop-help.com>

SEE ALSO

Imager(3)