|
ocssw
V2022
|
#include <stdint.h>Go to the source code of this file.
Classes | |
| struct | img_rgb_t |
Functions | |
| img_rgb_t * | img_new (int w, int h) |
| void | img_free (img_rgb_t *img) |
| int | img_write_ppm (img_rgb_t *img, char *filename) |
| img_rgb_t * | img_read_ppm (char *filename) |
| void | img_color_quant (img_rgb_t *img, int n_colors, int dither) |
| void | img_color_palette_quantization (img_rgb_t *in_image, int num_colors, uint8_t *palette, uint8_t *out_image) |
Detailed Description
imageutils is a library of functions that work on images.
Definition in file imageutils.h.
Function Documentation
◆ img_color_palette_quantization()
| void img_color_palette_quantization | ( | img_rgb_t * | in_image, |
| int | num_colors, | ||
| uint8_t * | palette, | ||
| uint8_t * | out_image | ||
| ) |
Take the input 24 bit full color RGB image and convert it into a color mapped image and color palette which have already been allocated by the caller.
- Parameters
-
in_image 24 bit RGB input image num_colors number of colors in the color palette palette color palette (allocated by caller) 3 bytes (r,g,b) for each entry out_image output image data (allocated by caller)
Definition at line 300 of file color_quant.c.
◆ img_color_quant()
| void img_color_quant | ( | img_rgb_t * | img, |
| int | n_colors, | ||
| int | dither | ||
| ) |
Definition at line 263 of file color_quant.c.
◆ img_free()
| void img_free | ( | img_rgb_t * | img | ) |
Definition at line 48 of file color_quant.c.
◆ img_new()
| img_rgb_t* img_new | ( | int | w, |
| int | h | ||
| ) |
Definition at line 40 of file color_quant.c.
◆ img_read_ppm()
| img_rgb_t* img_read_ppm | ( | char * | filename | ) |
Definition at line 75 of file color_quant.c.
◆ img_write_ppm()
| int img_write_ppm | ( | img_rgb_t * | img, |
| char * | filename | ||
| ) |
Definition at line 54 of file color_quant.c.


