diff options
Diffstat (limited to 'base/res_image.c')
-rw-r--r-- | base/res_image.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/base/res_image.c b/base/res_image.c new file mode 100644 index 00000000..dbeb1fd8 --- /dev/null +++ b/base/res_image.c @@ -0,0 +1,22 @@ +#include <fitz.h> + +fz_image * +fz_keepimage(fz_image *image) +{ + image->refs ++; + return image; +} + +void +fz_dropimage(fz_image *image) +{ + if (--image->refs == 0) + { + if (image->drop) + image->drop(image); + if (image->cs) + fz_dropcolorspace(image->cs); + fz_free(image); + } +} + |