diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/heif/heif_im2im.c | 5 | ||||
-rw-r--r-- | tests/heif/heif_read.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/heif/heif_im2im.c b/tests/heif/heif_im2im.c index 6ab9cf6..202d6b3 100644 --- a/tests/heif/heif_im2im.c +++ b/tests/heif/heif_im2im.c @@ -7,6 +7,8 @@ #include "gd.h" #include "gdtest.h" +#include <libheif/heif.h> + int main() { gdImagePtr src, dst; @@ -15,6 +17,9 @@ int main() int size = 0; CuTestImageResult result = {0, 0}; + if (!gdTestAssertMsg(heif_have_decoder_for_format(heif_compression_HEVC) && heif_have_encoder_for_format(heif_compression_HEVC), "HEVC codec support missing from libheif\n")) + return 77; + src = gdImageCreateTrueColor(100, 100); gdTestAssertMsg(src != NULL, "could not create src\n"); /* libheif seems to have some rounding issues */ diff --git a/tests/heif/heif_read.c b/tests/heif/heif_read.c index 469ea31..6ecb5f0 100644 --- a/tests/heif/heif_read.c +++ b/tests/heif/heif_read.c @@ -7,11 +7,16 @@ #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); |