kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2.git/commit/?id=ee862ac6bf91b9f206c2bedcf111fdb4a94b2862
commit ee862ac6bf91b9f206c2bedcf111fdb4a94b2862 Author: Kim Woelders <[email protected]> Date: Sun Apr 10 09:28:31 2022 +0200 test: Add some of JPEG 2000 tests --- test/images/Makefile | 23 ++++++++++++++++++++--- test/images/icon-64-gray.j2k | Bin 0 -> 2607 bytes test/images/icon-64-gray.jp2 | Bin 0 -> 2692 bytes test/images/icon-64.j2k | Bin 0 -> 6112 bytes test/images/icon-64.jp2 | Bin 0 -> 6197 bytes test/images/xeyes-gray.j2k | Bin 0 -> 8296 bytes test/images/xeyes-gray.jp2 | Bin 0 -> 8403 bytes test/images/xeyes-gray.png | Bin 0 -> 1895 bytes test/images/xeyes.j2k | Bin 0 -> 15969 bytes test/images/xeyes.jp2 | Bin 0 -> 16088 bytes test/test_load.cpp | 4 ++++ test/test_load_2.cpp | 11 +++++++++++ 12 files changed, 35 insertions(+), 3 deletions(-) diff --git a/test/images/Makefile b/test/images/Makefile old mode 100755 new mode 100644 index 544c157..f1e3054 --- a/test/images/Makefile +++ b/test/images/Makefile @@ -8,6 +8,8 @@ TYPES += gif TYPES += ico TYPES += jpg + TYPES += j2k + TYPES += jp2 TYPES += jxl #TYPES += lbm TYPES += ilbm @@ -25,8 +27,8 @@ #TYPES += gz #TYPES += id3 -.PHONY: all imgs_64 -all: imgs_64 +.PHONY: all imgs_64 imgs_misc +all: imgs_64 imgs_misc TYPES_64 = $(filter-out png, $(TYPES)) ff.bz2 ff.gz ff.xz # png.mp3 ALL_64 = $(addprefix icon-64., $(TYPES_64)) @@ -34,6 +36,12 @@ all: imgs_64 $(warning imgs_64=$(ALL_64)) imgs_64: $(ALL_64) + ALL_MISC = icon-64-gray.jp2 icon-64-gray.j2k + ALL_MISC += xeyes.jp2 xeyes.j2k + ALL_MISC += xeyes-gray.png + ALL_MISC += xeyes-gray.jp2 xeyes-gray.j2k +imgs_misc: $(ALL_MISC) + %.argb: %.png imlib2_conv $< $@ @@ -55,6 +63,15 @@ imgs_64: $(ALL_64) %.jpg: %.png convert $< $@ +%-gray.png: %.png + convert -colorspace Gray $< $@ + +%.jp2: %.png + opj2_compress -i $< -o $@ + +%.j2k: %.png + opj2_compress -i $< -o $@ + %.jxl: %.png cjxl $< $@ @@ -107,4 +124,4 @@ imgs_64: $(ALL_64) .PHONY: clean clean: - rm -f $(ALL_64) + rm -f $(ALL_64) $(ALL_MISC) diff --git a/test/images/icon-64-gray.j2k b/test/images/icon-64-gray.j2k new file mode 100644 index 0000000..840610d Binary files /dev/null and b/test/images/icon-64-gray.j2k differ diff --git a/test/images/icon-64-gray.jp2 b/test/images/icon-64-gray.jp2 new file mode 100644 index 0000000..73f0af1 Binary files /dev/null and b/test/images/icon-64-gray.jp2 differ diff --git a/test/images/icon-64.j2k b/test/images/icon-64.j2k new file mode 100644 index 0000000..314f15e Binary files /dev/null and b/test/images/icon-64.j2k differ diff --git a/test/images/icon-64.jp2 b/test/images/icon-64.jp2 new file mode 100644 index 0000000..4d003c0 Binary files /dev/null and b/test/images/icon-64.jp2 differ diff --git a/test/images/xeyes-gray.j2k b/test/images/xeyes-gray.j2k new file mode 100644 index 0000000..c5f6d90 Binary files /dev/null and b/test/images/xeyes-gray.j2k differ diff --git a/test/images/xeyes-gray.jp2 b/test/images/xeyes-gray.jp2 new file mode 100644 index 0000000..101a3c0 Binary files /dev/null and b/test/images/xeyes-gray.jp2 differ diff --git a/test/images/xeyes-gray.png b/test/images/xeyes-gray.png new file mode 100644 index 0000000..f824c47 Binary files /dev/null and b/test/images/xeyes-gray.png differ diff --git a/test/images/xeyes.j2k b/test/images/xeyes.j2k new file mode 100644 index 0000000..ef90df5 Binary files /dev/null and b/test/images/xeyes.j2k differ diff --git a/test/images/xeyes.jp2 b/test/images/xeyes.jp2 new file mode 100644 index 0000000..e43f5fe Binary files /dev/null and b/test/images/xeyes.jp2 differ diff --git a/test/test_load.cpp b/test/test_load.cpp index e6ae3e4..c4c999a 100644 --- a/test/test_load.cpp +++ b/test/test_load.cpp @@ -25,6 +25,10 @@ static const char *const pfxs[] = { "ico", "jpg.mp3", // id3 "jpg", +#ifdef BUILD_J2K_LOADER + "jp2", + "j2k", +#endif #ifdef BUILD_JXL_LOADER "jxl", #endif diff --git a/test/test_load_2.cpp b/test/test_load_2.cpp index 1facb42..b94807f 100644 --- a/test/test_load_2.cpp +++ b/test/test_load_2.cpp @@ -39,10 +39,21 @@ static tii_t tii[] = { { "icon-64.ilbm", 1153555547 }, { "icon-64.jpg", 4132154843 }, { "icon-64.jpg.mp3", 4132154843 }, +#ifdef BUILD_J2K_LOADER + { "icon-64.jp2", 451428725 }, + { "icon-64.j2k", 451428725 }, + { "xeyes.jp2", 2937827957 }, + { "xeyes.j2k", 2937827957 }, + { "icon-64-gray.jp2", 2437152898 }, + { "icon-64-gray.j2k", 2437152898 }, + { "xeyes-gray.jp2", 3377113384 }, + { "xeyes-gray.j2k", 3377113384 }, +#endif #ifdef BUILD_JXL_LOADER { "icon-64.jxl", 712907299 }, #endif { "icon-64.png", 1153555547 }, + { "xeyes-gray.png", 3493264608 }, { "icon-64.ppm", 1153555547 }, { "icon-64.pgm", 140949526 }, { "icon-64.pbm", 2153856013 }, --
