libguac
1.0.0
|
Provides functions and structures for producing likely-to-be-unique hash values for images. More...
Go to the source code of this file.
Functions | |
unsigned int | guac_hash_surface (cairo_surface_t *surface) |
Produces a 24-bit hash value from all pixels of the given surface. More... | |
int | guac_surface_cmp (cairo_surface_t *a, cairo_surface_t *b) |
Given two Cairo surfaces, returns zero if the data contained within each is identical, and a positive or negative value if the value of the first is found to be lexically greater or less than the second respectively. More... | |
Provides functions and structures for producing likely-to-be-unique hash values for images.
unsigned int guac_hash_surface | ( | cairo_surface_t * | surface | ) |
Produces a 24-bit hash value from all pixels of the given surface.
The surface provided must be RGB or ARGB with each pixel stored in 32 bits. The hashing algorithm used is a variant of the cyclic polynomial rolling hash.
surface | The Cairo surface to hash. |
int guac_surface_cmp | ( | cairo_surface_t * | a, |
cairo_surface_t * | b | ||
) |
Given two Cairo surfaces, returns zero if the data contained within each is identical, and a positive or negative value if the value of the first is found to be lexically greater or less than the second respectively.
a | The first Cairo surface to compare. |
b | The Cairo surface to compare the first surface against. |