The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
i_ppix(im, x, y, color)

Sets the pixel at (x,y) to color.

Returns 0 if the pixel was drawn, or -1 if not.

Does no alpha blending, just copies the channels from the supplied color to the image.

i_gpix(im, x, y, color)

Retrieves the color of the pixel (x,y).

Returns 0 if the pixel was retrieved, or -1 if not.

i_ppixf(im, x, y, fcolor)

Sets the pixel at (x,y) to the floating point color fcolor.

Returns 0 if the pixel was drawn, or -1 if not.

Does no alpha blending, just copies the channels from the supplied color to the image.

i_gpixf(im, x, y, fcolor)

Retrieves the color of the pixel (x,y) as a floating point color into fcolor.

Returns 0 if the pixel was retrieved, or -1 if not.

i_plin(im, l, r, y, colors)

Sets (r-l) pixels starting from (l,y) using (r-l) values from colors.

Returns the number of pixels set.

i_glin(im, l, r, y, colors)

Retrieves (r-l) pixels starting from (l,y) into colors.

Returns the number of pixels retrieved.

i_plinf(im, left, right, fcolors)

Sets (right-left) pixels starting from (left,y) using (right-left) floating point colors from fcolors.

Returns the number of pixels set.

i_glinf(im, l, r, y, colors)

Retrieves (r-l) pixels starting from (l,y) into colors as floating point colors.

Returns the number of pixels retrieved.

i_gsamp(im, left, right, y, samples, channels, channel_count)

Reads sample values from im for the horizontal line (left, y) to (right-1,y) for the channels specified by channels, an array of int with channel_count elements.

If channels is NULL then the first channels_count channels are retrieved for each pixel.

Returns the number of samples read (which should be (right-left) * channel_count)

i_gsampf(im, left, right, y, samples, channels, channel_count)

Reads floating point sample values from im for the horizontal line (left, y) to (right-1,y) for the channels specified by channels, an array of int with channel_count elements.

If channels is NULL then the first channel_count channels are retrieved for each pixel.

Returns the number of samples read (which should be (right-left) * channel_count)

i_gsamp_bits(im, left, right, y, samples, channels, channel_count, bits) =category Drawing

Reads integer samples scaled to bits bits of precision into the unsigned int array samples.

Expect this to be slow unless bits == im->bits.

Returns the number of samples copied, or -1 on error.

Not all image types implement this method.

Pushes errors, but does not call i_clear_error().

i_psamp_bits(im, left, right, y, samples, channels, channel_count, bits) =category Drawing

Writes integer samples scaled to bits bits of precision from the unsigned int array samples.

Expect this to be slow unless bits == im->bits.

Returns the number of samples copied, or -1 on error.

Not all image types implement this method.

Pushes errors, but does not call i_clear_error().

i_gpal(im, left, right, y, indexes)

Reads palette indexes for the horizontal line (left, y) to (right-1, y) into indexes.

Returns the number of indexes read.

Always returns 0 for direct color images.

i_ppal(im, left, right, y, indexes)

Writes palette indexes for the horizontal line (left, y) to (right-1, y) from indexes.

Returns the number of indexes written.

Always returns 0 for direct color images.

i_addcolors(im, colors, count)

Adds colors to the image's palette.

On success returns the index of the lowest color added.

On failure returns -1.

Always fails for direct color images.

i_getcolors(im, index, colors, count)

Retrieves count colors starting from index in the image's palette.

On success stores the colors into colors and returns true.

On failure returns false.

Always fails for direct color images.

Fails if there are less than index+count colors in the image's palette.

i_colorcount(im)

Returns the number of colors in the image's palette.

Returns -1 for direct images.

i_maxcolors(im)

Returns the maximum number of colors the palette can hold for the image.

Returns -1 for direct color images.

i_findcolor(im, color, &entry)

Searches the images palette for the given color.

On success sets *entry to the index of the color, and returns true.

On failure returns false.

Always fails on direct color images.

i_setcolors(im, index, colors, count)

Sets count colors starting from index in the image's palette.

On success returns true.

On failure returns false.

The image must have at least index+count colors in it's palette for this to succeed.

Always fails on direct color images.

im_get_context()

Retrieve the context object for the current thread.

Inside Imager itself this is just a function pointer, which the Imager.xs BOOT handler initializes for use within perl. If you're taking the Imager code and embedding it elsewhere you need to initialize the im_get_context pointer at some point.

19 POD Errors

The following errors were encountered while parsing the POD:

Around line 235:

'=item' outside of any '=over'

=over without closing =back

Around line 237:

Unknown directive: =category

Around line 257:

Unknown directive: =category

Around line 274:

Unknown directive: =category

Around line 293:

Unknown directive: =category

Around line 311:

Unknown directive: =category

Around line 329:

Unknown directive: =category

Around line 346:

Unknown directive: =category

Around line 364:

Unknown directive: =category

Around line 382:

Unknown directive: =category

Around line 405:

Unknown directive: =category

Around line 464:

Unknown directive: =category

Around line 483:

Unknown directive: =category

Around line 502:

Unknown directive: =category

Around line 523:

Unknown directive: =category

Around line 548:

Unknown directive: =category

Around line 565:

Unknown directive: =category

Around line 583:

Unknown directive: =category

Around line 603:

Unknown directive: =category