blob: 6ecb5f09bbd0dc76bcabd90d06ff731dc988b53d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/**
* Simple test case that confirms the failure of using `gdImageCreateFromHeif`
* with a NULL pointer.
*/
#include "gd.h"
#include "gdtest.h"
#include <libheif/heif.h>
int main()
{
gdImagePtr im;
FILE *fp;
if (!gdTestAssertMsg(heif_have_decoder_for_format(heif_compression_HEVC), "HEVC codec support missing from libheif\n"))
return 77;
fp = gdTestFileOpen2("heif", "label.heic");
gdTestAssert(fp != NULL);
im = gdImageCreateFromHeif(fp);
if (gdTestAssert(im != NULL))
gdImageDestroy(im);
fclose(fp);
return gdNumFailures();
}
|