diff options
author | Pierre Joye <pierre.php@gmail.com> | 2022-01-22 11:27:10 +0700 |
---|---|---|
committer | Pierre Joye <pierre.php@gmail.com> | 2022-01-22 11:27:10 +0700 |
commit | e360440dab7eeebc7d3b8cfe204b5887715d9a08 (patch) | |
tree | 4b2752d19dd8d7f847dc4dd10936bf2ec0e20427 | |
parent | 69bd845260d61961e3367f5dc25320f31161ebea (diff) | |
download | libgd-bug/788.tar.gz |
fix wsbug/788
-rw-r--r-- | tests/heif/bug788.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/heif/bug788.c b/tests/heif/bug788.c index af6d098..5475251 100644 --- a/tests/heif/bug788.c +++ b/tests/heif/bug788.c @@ -15,29 +15,29 @@ int main () { int size; void *data; CuTestImageResult result = {0, 0}; - fp = gdTestFileOpen2("heif", "bug788.png"); - in = gdImageCreateFromPng(fp); - fclose(fp); + fp = gdTestFileOpen2("heif", "bug788.png"); + in = gdImageCreateFromPng(fp); + fclose(fp); fp = fopen("1.png", "wb"); - gdImagePng(in, fp); - fclose(fp); + gdImagePng(in, fp); + fclose(fp); data = gdImageHeifPtrEx(in, &size, 200, GD_HEIF_CODEC_HEVC, GD_HEIF_CHROMA_444); dst = gdImageCreateFromHeifPtr(size, data); diff = gdImageCreateTrueColor(gdImageSX(dst), gdImageSY(dst)); if (gdTestAssertMsg(dst != NULL, "cannot compare with NULL buffer")) { - gdTestImageDiff(in, dst, diff, &result); + gdTestImageDiff(in, dst, diff, &result); } fp = fopen("2.png", "wb"); - gdImageHeif(dst, fp); - fclose(fp); + gdImageHeif(dst, fp); + fclose(fp); fp = fopen("3.png", "wb"); - gdImagePng(diff, fp); - fclose(fp); + gdImagePng(diff, fp); + fclose(fp); /* colorspace conversion cannot avoid colors differences, even if we use the same format/colorspace for in and out */ gdTestAssertMsg(result.pixels_changed > 30, "pixels changed: %d\n", result.pixels_changed); gdImageDestroy(dst); - gdImageDestroy(in); + gdImageDestroy(in); gdImageDestroy(diff); - return 0; + return 0; }
\ No newline at end of file |