This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository legacy-imlib2.
View the commit online.
commit 3d5c85c1f92c6cc0f0a3ed71a2c31dd9539e158f
Author: Kim Woelders <k...@woelders.dk>
AuthorDate: Fri Feb 28 07:20:06 2025 +0100
test: Add basic avif test
---
test/images/Makefile | 5 +++++
test/images/image-alpha-64.avif | Bin 0 -> 3211 bytes
test/images/image-noalp-64.avif | Bin 0 -> 1825 bytes
test/test_load.cpp | 3 +++
test/test_load_2.cpp | 4 ++++
test/test_save.cpp | 11 +++++++++--
6 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/test/images/Makefile b/test/images/Makefile
index d8f34fe..17f301d 100644
--- a/test/images/Makefile
+++ b/test/images/Makefile
@@ -13,6 +13,7 @@
FFMPEG = ffmpeg -y -v -1
TYPES_NOALP += .png
+ TYPES_NOALP += .avif
TYPES_NOALP += .argb
TYPES_NOALP += .bmp
TYPES_NOALP += .ff
@@ -42,6 +43,7 @@
#TYPES_NOALP += .gz
#TYPES_NOALP += .id3
+ TYPES_ALPHA += .avif
TYPES_ALPHA += .ff
TYPES_ALPHA += .gif
TYPES_ALPHA += .heif
@@ -86,6 +88,9 @@ image-noalp-64.svg: image-alpha-64.svg
%.argb: %.png
$(IMCONV) $< $@
+%.avif: %.png
+ avifenc -o $@ $<
+
%.bmp: %.png
$(CONVERT) $< $@
diff --git a/test/images/image-alpha-64.avif b/test/images/image-alpha-64.avif
new file mode 100644
index 0000000..91b3fd2
Binary files /dev/null and b/test/images/image-alpha-64.avif differ
diff --git a/test/images/image-noalp-64.avif b/test/images/image-noalp-64.avif
new file mode 100644
index 0000000..5be0d6b
Binary files /dev/null and b/test/images/image-noalp-64.avif differ
diff --git a/test/test_load.cpp b/test/test_load.cpp
index ec57e9a..e7380bc 100644
--- a/test/test_load.cpp
+++ b/test/test_load.cpp
@@ -16,6 +16,9 @@
static const char *const pfxs[] = {
"argb",
+#ifdef BUILD_AVIF_LOADER
+ "avif",
+#endif
"bmp",
"ff",
#ifdef BUILD_GIF_LOADER
diff --git a/test/test_load_2.cpp b/test/test_load_2.cpp
index 8c400b6..d16713a 100644
--- a/test/test_load_2.cpp
+++ b/test/test_load_2.cpp
@@ -25,6 +25,10 @@ typedef struct {
static tii_t tii[] = {
/**INDENT-OFF**/
{ "image-noalp-64.argb", 1636116234 },
+#ifdef BUILD_AVIF_LOADER
+ { "image-noalp-64.avif", 1550669574 },
+ { "image-alpha-64.avif", 3518810777 },
+#endif
{ "image-noalp-64.bmp", 1636116234 },
{ "image-noalp-64.ff", 1636116234 },
{ "image-alpha-64.ff", 169859126 },
diff --git a/test/test_save.cpp b/test/test_save.cpp
index 867d068..b41ce86 100644
--- a/test/test_save.cpp
+++ b/test/test_save.cpp
@@ -24,6 +24,9 @@ typedef struct {
static const test_rec_t exts[] = {
// { "ani", { 0, 0 } },
{ "argb", { 1636116234, 169859126 } },
+#ifdef BUILD_AVIF_LOADER
+ { "avif", { 3693319173, 2634318821 } },
+#endif
{ "bmp", { 1636116234, 247945219 } },
// { "bz2", { 0, 0 } },
{ "ff", { 1636116234, 169859126 } },
@@ -31,10 +34,14 @@ static const test_rec_t exts[] = {
#ifdef BUILD_HEIF_LOADER
#ifndef __SANITIZE_ADDRESS__
#if LIBHEIF_HAVE_VERSION(1, 19, 0)
+#ifndef BUILD_AVIF_LOADER
{ "avif", { 271316575, 632516970 } },
+#endif
{ "heic", { 2429908023, 1720725349 } },
#else
+#ifndef BUILD_AVIF_LOADER
{ "avif", { 458570512, 4237984766 } },
+#endif
{ "heic", { 4046271191, 793249753 } },
#endif
#endif
@@ -89,8 +96,8 @@ static int
progress(Imlib_Image im, char percent, int update_x, int update_y,
int update_w, int update_h)
{
- D("%s: %3d%% %4d,%4d %4dx%4d\n",
- __func__, percent, update_x, update_y, update_w, update_h);
+ D2("%s: %3d%% %4d,%4d %4dx%4d\n",
+ __func__, percent, update_x, update_y, update_w, update_h);
return 1; /* Continue */
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.