![]() |
GFXprim
2D bitmap graphics library with emphasis on speed and correctness
|
Dithering algorithms. More...
#include <filters/gp_filter.h>Go to the source code of this file.
Typedefs | |
| typedef enum gp_dither_type | gp_dither_type |
| Dithering types. | |
Enumerations | |
| enum | gp_dither_type { GP_DITHER_FLOYD_STEINBERG , GP_DITHER_ATKINSON , GP_DITHER_SIERRA , GP_DITHER_SIERRA_LITE , GP_DITHER_HILBERT_PEANO , GP_DITHER_BAYER_4 , GP_DITHER_SHARPENED_BAYER_4 , GP_DITHER_BAYER_8 , GP_DITHER_SHARPENED_BAYER_8 , GP_DITHER_MAX } |
| Dithering types. More... | |
Functions | |
| gp_dither_type | gp_dither_type_by_name (const char *dither_name) |
| Returns dithering type by name. | |
| const char * | gp_dither_type_name (gp_dither_type dither_type) |
| Returns dithering name for a given dithering type. | |
| int | gp_filter_dither (gp_dither_type type, const gp_pixmap *src, gp_pixmap *dst, gp_progress_cb *callback) |
| Runs dithering from src->pixel_type to dst->pixel_type. | |
| gp_pixmap * | gp_filter_dither_alloc (gp_dither_type type, const gp_pixmap *src, gp_pixel_type pixel_type, gp_progress_cb *callback) |
| Allocates dst and runs dithering from src->pixel_type to pixel_type. | |
| int | gp_filter_floyd_steinberg (const gp_pixmap *src, gp_pixmap *dst, gp_progress_cb *callback) |
| Runs floyd_steinberg dithering from src::pixel_type to dst::pixel_type. | |
| static gp_pixmap * | gp_filter_floyd_steinberg_alloc (const gp_pixmap *src, gp_pixel_type pixel_type, gp_progress_cb *callback) |
| Allocates dst and runs floyd_steinberg dithering from src->pixel_type to dst->pixel_type. | |
| int | gp_filter_atkinson (const gp_pixmap *src, gp_pixmap *dst, gp_progress_cb *callback) |
| Runs atkinson dithering from src::pixel_type to dst::pixel_type. | |
| static gp_pixmap * | gp_filter_atkinson_alloc (const gp_pixmap *src, gp_pixel_type pixel_type, gp_progress_cb *callback) |
| Allocates dst and runs atkinson dithering from src->pixel_type to dst->pixel_type. | |
| int | gp_filter_sierra (const gp_pixmap *src, gp_pixmap *dst, gp_progress_cb *callback) |
| Runs sierra dithering from src::pixel_type to dst::pixel_type. | |
| static gp_pixmap * | gp_filter_sierra_alloc (const gp_pixmap *src, gp_pixel_type pixel_type, gp_progress_cb *callback) |
| Allocates dst and runs sierra dithering from src->pixel_type to dst->pixel_type. | |
| int | gp_filter_sierra_lite (const gp_pixmap *src, gp_pixmap *dst, gp_progress_cb *callback) |
| Runs sierra_lite dithering from src::pixel_type to dst::pixel_type. | |
| static gp_pixmap * | gp_filter_sierra_lite_alloc (const gp_pixmap *src, gp_pixel_type pixel_type, gp_progress_cb *callback) |
| Allocates dst and runs sierra_lite dithering from src->pixel_type to dst->pixel_type. | |
| int | gp_filter_hilbert_peano (const gp_pixmap *src, gp_pixmap *dst, gp_progress_cb *callback) |
| Runs hilbert_peano dithering from src::pixel_type to dst::pixel_type. | |
| static gp_pixmap * | gp_filter_hilbert_peano_alloc (const gp_pixmap *src, gp_pixel_type pixel_type, gp_progress_cb *callback) |
| Allocates dst and runs hilbert_peano dithering from src->pixel_type to dst->pixel_type. | |
| int | gp_filter_bayer_4 (const gp_pixmap *src, gp_pixmap *dst, gp_progress_cb *callback) |
| Runs bayer_4 dithering from src::pixel_type to dst::pixel_type. | |
| static gp_pixmap * | gp_filter_bayer_4_alloc (const gp_pixmap *src, gp_pixel_type pixel_type, gp_progress_cb *callback) |
| Allocates dst and runs bayer_4 dithering from src->pixel_type to dst->pixel_type. | |
| int | gp_filter_sharpened_bayer_4 (const gp_pixmap *src, gp_pixmap *dst, gp_progress_cb *callback) |
| Runs sharpened_bayer_4 dithering from src::pixel_type to dst::pixel_type. | |
| static gp_pixmap * | gp_filter_sharpened_bayer_4_alloc (const gp_pixmap *src, gp_pixel_type pixel_type, gp_progress_cb *callback) |
| Allocates dst and runs sharpened_bayer_4 dithering from src->pixel_type to dst->pixel_type. | |
| int | gp_filter_bayer_8 (const gp_pixmap *src, gp_pixmap *dst, gp_progress_cb *callback) |
| Runs bayer_8 dithering from src::pixel_type to dst::pixel_type. | |
| static gp_pixmap * | gp_filter_bayer_8_alloc (const gp_pixmap *src, gp_pixel_type pixel_type, gp_progress_cb *callback) |
| Allocates dst and runs bayer_8 dithering from src->pixel_type to dst->pixel_type. | |
| int | gp_filter_sharpened_bayer_8 (const gp_pixmap *src, gp_pixmap *dst, gp_progress_cb *callback) |
| Runs sharpened_bayer_8 dithering from src::pixel_type to dst::pixel_type. | |
| static gp_pixmap * | gp_filter_sharpened_bayer_8_alloc (const gp_pixmap *src, gp_pixel_type pixel_type, gp_progress_cb *callback) |
| Allocates dst and runs sharpened_bayer_8 dithering from src->pixel_type to dst->pixel_type. | |
Dithering algorithms.
| Original Image | RGB332 | G8 | G4 | G2 | G1 |
|---|---|---|---|---|---|
|
|
|
|
|
|
| Original Image | RGB332 | G8 | G4 | G2 | G1 |
|---|---|---|---|---|---|
|
|
|
|
|
|
| Original Image | RGB332 | G8 | G4 | G2 | G1 |
|---|---|---|---|---|---|
|
|
|
|
|
|
| Original Image | RGB332 | G8 | G4 | G2 | G1 |
|---|---|---|---|---|---|
|
|
|
|
|
|
| Original Image | RGB332 | G8 | G4 | G2 | G1 |
|---|---|---|---|---|---|
|
|
|
|
|
|
| Original Image | RGB332 | G8 | G4 | G2 | G1 |
|---|---|---|---|---|---|
|
|
|
|
|
|
| Original Image | RGB332 | G8 | G4 | G2 | G1 |
|---|---|---|---|---|---|
|
|
|
|
|
|
| Original Image | RGB332 | G8 | G4 | G2 | G1 |
|---|---|---|---|---|---|
|
|
|
|
|
|
| Original Image | RGB332 | G8 | G4 | G2 | G1 |
|---|---|---|---|---|---|
|
|
|
|
|
|
| Original Image | RGB332 | G8 | G4 | G2 | G1 |
|---|---|---|---|---|---|
|
|
|
|
|
|
Definition in file gp_dither.gen.h.
| enum gp_dither_type |
Dithering types.
Definition at line 29 of file gp_dither.gen.h.
| gp_dither_type gp_dither_type_by_name | ( | const char * | dither_name | ) |
Returns dithering type by name.
The lookup is not case sensitive and also works for two letter acronyms of the ditherings. The indended usage for two letter acronyms are shorter command line options, e.g. '-d at'.
| Canonical name | Acronym |
|---|---|
| Floyd Steinberg | fs |
| Atkinson | at |
| Sierra | si |
| Sierra Lite | sl |
| Hilbert Peano | hp |
| Bayer 4x4 | b4 |
| Sharpened Bayer 4x4 | s4 |
| Bayer 8x8 | b8 |
| Sharpened Bayer 8x8 | s8 |
| dither_name | A dithering name. |
| const char * gp_dither_type_name | ( | gp_dither_type | dither_type | ) |
Returns dithering name for a given dithering type.
| dither_type | A dithering type id. |
| int gp_filter_atkinson | ( | const gp_pixmap * | src, |
| gp_pixmap * | dst, | ||
| gp_progress_cb * | callback ) |
Runs atkinson dithering from src::pixel_type to dst::pixel_type.
|
inlinestatic |
Allocates dst and runs atkinson dithering from src->pixel_type to dst->pixel_type.
Definition at line 217 of file gp_dither.gen.h.
References GP_DITHER_ATKINSON, and gp_filter_dither_alloc().
| int gp_filter_bayer_4 | ( | const gp_pixmap * | src, |
| gp_pixmap * | dst, | ||
| gp_progress_cb * | callback ) |
Runs bayer_4 dithering from src::pixel_type to dst::pixel_type.
|
inlinestatic |
Allocates dst and runs bayer_4 dithering from src->pixel_type to dst->pixel_type.
Definition at line 301 of file gp_dither.gen.h.
References GP_DITHER_BAYER_4, and gp_filter_dither_alloc().
| int gp_filter_bayer_8 | ( | const gp_pixmap * | src, |
| gp_pixmap * | dst, | ||
| gp_progress_cb * | callback ) |
Runs bayer_8 dithering from src::pixel_type to dst::pixel_type.
|
inlinestatic |
Allocates dst and runs bayer_8 dithering from src->pixel_type to dst->pixel_type.
Definition at line 343 of file gp_dither.gen.h.
References GP_DITHER_BAYER_8, and gp_filter_dither_alloc().
| int gp_filter_dither | ( | gp_dither_type | type, |
| const gp_pixmap * | src, | ||
| gp_pixmap * | dst, | ||
| gp_progress_cb * | callback ) |
Runs dithering from src->pixel_type to dst->pixel_type.
| gp_pixmap * gp_filter_dither_alloc | ( | gp_dither_type | type, |
| const gp_pixmap * | src, | ||
| gp_pixel_type | pixel_type, | ||
| gp_progress_cb * | callback ) |
Allocates dst and runs dithering from src->pixel_type to pixel_type.
Referenced by gp_filter_atkinson_alloc(), gp_filter_bayer_4_alloc(), gp_filter_bayer_8_alloc(), gp_filter_floyd_steinberg_alloc(), gp_filter_hilbert_peano_alloc(), gp_filter_sharpened_bayer_4_alloc(), gp_filter_sharpened_bayer_8_alloc(), gp_filter_sierra_alloc(), and gp_filter_sierra_lite_alloc().
| int gp_filter_floyd_steinberg | ( | const gp_pixmap * | src, |
| gp_pixmap * | dst, | ||
| gp_progress_cb * | callback ) |
Runs floyd_steinberg dithering from src::pixel_type to dst::pixel_type.
|
inlinestatic |
Allocates dst and runs floyd_steinberg dithering from src->pixel_type to dst->pixel_type.
Definition at line 196 of file gp_dither.gen.h.
References GP_DITHER_FLOYD_STEINBERG, and gp_filter_dither_alloc().
| int gp_filter_hilbert_peano | ( | const gp_pixmap * | src, |
| gp_pixmap * | dst, | ||
| gp_progress_cb * | callback ) |
Runs hilbert_peano dithering from src::pixel_type to dst::pixel_type.
|
inlinestatic |
Allocates dst and runs hilbert_peano dithering from src->pixel_type to dst->pixel_type.
Definition at line 280 of file gp_dither.gen.h.
References GP_DITHER_HILBERT_PEANO, and gp_filter_dither_alloc().
| int gp_filter_sharpened_bayer_4 | ( | const gp_pixmap * | src, |
| gp_pixmap * | dst, | ||
| gp_progress_cb * | callback ) |
Runs sharpened_bayer_4 dithering from src::pixel_type to dst::pixel_type.
|
inlinestatic |
Allocates dst and runs sharpened_bayer_4 dithering from src->pixel_type to dst->pixel_type.
Definition at line 322 of file gp_dither.gen.h.
References GP_DITHER_SHARPENED_BAYER_4, and gp_filter_dither_alloc().
| int gp_filter_sharpened_bayer_8 | ( | const gp_pixmap * | src, |
| gp_pixmap * | dst, | ||
| gp_progress_cb * | callback ) |
Runs sharpened_bayer_8 dithering from src::pixel_type to dst::pixel_type.
|
inlinestatic |
Allocates dst and runs sharpened_bayer_8 dithering from src->pixel_type to dst->pixel_type.
Definition at line 364 of file gp_dither.gen.h.
References GP_DITHER_SHARPENED_BAYER_8, and gp_filter_dither_alloc().
| int gp_filter_sierra | ( | const gp_pixmap * | src, |
| gp_pixmap * | dst, | ||
| gp_progress_cb * | callback ) |
Runs sierra dithering from src::pixel_type to dst::pixel_type.
|
inlinestatic |
Allocates dst and runs sierra dithering from src->pixel_type to dst->pixel_type.
Definition at line 238 of file gp_dither.gen.h.
References GP_DITHER_SIERRA, and gp_filter_dither_alloc().
| int gp_filter_sierra_lite | ( | const gp_pixmap * | src, |
| gp_pixmap * | dst, | ||
| gp_progress_cb * | callback ) |
Runs sierra_lite dithering from src::pixel_type to dst::pixel_type.
|
inlinestatic |
Allocates dst and runs sierra_lite dithering from src->pixel_type to dst->pixel_type.
Definition at line 259 of file gp_dither.gen.h.
References GP_DITHER_SIERRA_LITE, and gp_filter_dither_alloc().