palimg.c - implements paletted images for Imager.
Implements paletted images using the new image interface.
Basic 8-bit/sample paletted image
x
y
channels
maxpal
Creates a new paletted image of the supplied dimensions.
maxpal is the maximum palette size and should normally be 256.
Returns a new image or NULL on failure.
Also callable as i_img_pal_new(width, height, channels, max_palette_size).
i_img_pal_new(width, height, channels, max_palette_size)
Converts paletted data in src to RGB data in targ
Internal function.
src must be a paletted image and targ must be an RGB image with the same width, height and channels.
Converts im from a paletted image to an RGB image.
The conversion is done in place.
The conversion cannot be done for virtual images.
Converts an RGB image to a paletted image
Destroys data related to a paletted image.
Write to a pixel in the image.
Warning: converts the image to a RGB image if the color isn't already present in the image.
Retrieve a pixel, converting from a palette index to a color.
Retrieve a row of pixels.
Write a line of color data to the image.
If any color value is not in the image when the image is converted to RGB.
Implement psamp() for paletted images.
Since writing samples doesn't really work as a concept for paletted images, this is slow.
Also, writing samples may convert the image to a direct image in the process, so use i_ppix/i_gpix instead of directly calling the paletted handlers.
Implement psampf() for paletted images.
Also, writing samples may convert the image to a direct image in the process, so use i_ppixf/i_gpixf instead of directly calling the paletted handlers.
Tony Cook <tony@develop-help.com>
Imager(3)
To install Imager, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Imager
CPAN shell
perl -MCPAN -e shell install Imager
For more information on module installation, please visit the detailed CPAN module installation guide.