summaryrefslogtreecommitdiff
path: root/world/res_image.c
blob: dbeb1fd8b415c64a8956d2ca3d249966367ed872 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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);
	}
}