• R/O
  • SSH

GM: Commit

Main GraphicsMagick source repository


Commit MetaInfo

Revision9164b6c0f0a69eec1cae42336ef4a86d1c9cd68e (tree)
Time2021-07-12 18:16:33
AuthorTobias <tbsmark86@gmai...>
CommiterTobias

Log Message

Added minimal reader for heif image format

Change Summary

Incremental Difference

diff -r 48c9416cca66 -r 9164b6c0f0a6 Makefile.in
--- a/Makefile.in Mon May 10 11:16:24 2021 -0500
+++ b/Makefile.in Mon Jul 12 11:16:33 2021 +0200
@@ -225,8 +225,8 @@
225225 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
226226 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
227227 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
228- $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
229- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
228+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/acinclude.m4 \
229+ $(top_srcdir)/configure.ac
230230 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
231231 $(ACLOCAL_M4)
232232 DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
@@ -522,6 +522,15 @@
522522 $(AM_CFLAGS) $(CFLAGS) $(coders_gray_la_LDFLAGS) $(LDFLAGS) -o \
523523 $@
524524 @WITH_MODULES_TRUE@am_coders_gray_la_rpath = -rpath $(codersdir)
525+coders_heif_la_DEPENDENCIES = $(LIBMAGICK) $(am__DEPENDENCIES_1)
526+am_coders_heif_la_OBJECTS = coders/heif_la-heif.lo
527+coders_heif_la_OBJECTS = $(am_coders_heif_la_OBJECTS)
528+coders_heif_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
529+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
530+ $(AM_CFLAGS) $(CFLAGS) $(coders_heif_la_LDFLAGS) $(LDFLAGS) -o \
531+ $@
532+@HasHEIF_TRUE@@WITH_MODULES_TRUE@am_coders_heif_la_rpath = -rpath \
533+@HasHEIF_TRUE@@WITH_MODULES_TRUE@ $(codersdir)
525534 coders_histogram_la_DEPENDENCIES = $(LIBMAGICK)
526535 am_coders_histogram_la_OBJECTS = coders/histogram_la-histogram.lo
527536 coders_histogram_la_OBJECTS = $(am_coders_histogram_la_OBJECTS)
@@ -1219,7 +1228,7 @@
12191228 coders/psd.c coders/dps.c coders/clipboard.c coders/emf.c \
12201229 coders/fpx.c coders/jbig.c coders/jnx.c coders/jpeg.c \
12211230 coders/jp2.c coders/ept.c coders/tiff.c coders/x.c \
1222- coders/xwd.c coders/webp.c filters/analyze.c
1231+ coders/xwd.c coders/webp.c coders/heif.c filters/analyze.c
12231232 @HasX11_TRUE@am__objects_1 = magick/libGraphicsMagick_la-animate.lo \
12241233 @HasX11_TRUE@ magick/libGraphicsMagick_la-display.lo \
12251234 @HasX11_TRUE@ magick/libGraphicsMagick_la-PreRvIcccm.lo \
@@ -1325,7 +1334,9 @@
13251334 @HasX11_TRUE@ coders/magick_libGraphicsMagick_la-xwd.lo
13261335 @HasWEBP_TRUE@am__objects_14 = \
13271336 @HasWEBP_TRUE@ coders/magick_libGraphicsMagick_la-webp.lo
1328-am__objects_15 = $(am__objects_4) \
1337+@HasHEIF_TRUE@am__objects_15 = \
1338+@HasHEIF_TRUE@ coders/magick_libGraphicsMagick_la-heif.lo
1339+am__objects_16 = $(am__objects_4) \
13291340 coders/magick_libGraphicsMagick_la-art.lo \
13301341 coders/magick_libGraphicsMagick_la-avs.lo \
13311342 coders/magick_libGraphicsMagick_la-bmp.lo \
@@ -1414,11 +1425,12 @@
14141425 coders/magick_libGraphicsMagick_la-yuv.lo $(am__objects_5) \
14151426 $(am__objects_6) $(am__objects_7) $(am__objects_8) \
14161427 $(am__objects_9) $(am__objects_10) $(am__objects_11) \
1417- $(am__objects_12) $(am__objects_13) $(am__objects_14)
1418-am__objects_16 = filters/magick_libGraphicsMagick_la-analyze.lo
1428+ $(am__objects_12) $(am__objects_13) $(am__objects_14) \
1429+ $(am__objects_15)
1430+am__objects_17 = filters/magick_libGraphicsMagick_la-analyze.lo
14191431 @WITH_MODULES_FALSE@am_magick_libGraphicsMagick_la_OBJECTS = \
14201432 @WITH_MODULES_FALSE@ $(am__objects_2) $(am__objects_3) \
1421-@WITH_MODULES_FALSE@ $(am__objects_15) $(am__objects_16)
1433+@WITH_MODULES_FALSE@ $(am__objects_16) $(am__objects_17)
14221434 @WITH_MODULES_TRUE@am_magick_libGraphicsMagick_la_OBJECTS = \
14231435 @WITH_MODULES_TRUE@ $(am__objects_2) $(am__objects_3)
14241436 magick_libGraphicsMagick_la_OBJECTS = \
@@ -1429,11 +1441,11 @@
14291441 $(LDFLAGS) -o $@
14301442 wand_libGraphicsMagickWand_la_DEPENDENCIES = $(LIBMAGICK) \
14311443 $(am__DEPENDENCIES_1)
1432-am__objects_17 = wand/libGraphicsMagickWand_la-drawing_wand.lo \
1444+am__objects_18 = wand/libGraphicsMagickWand_la-drawing_wand.lo \
14331445 wand/libGraphicsMagickWand_la-magick_compat.lo \
14341446 wand/libGraphicsMagickWand_la-magick_wand.lo \
14351447 wand/libGraphicsMagickWand_la-pixel_wand.lo
1436-am_wand_libGraphicsMagickWand_la_OBJECTS = $(am__objects_17)
1448+am_wand_libGraphicsMagickWand_la_OBJECTS = $(am__objects_18)
14371449 wand_libGraphicsMagickWand_la_OBJECTS = \
14381450 $(am_wand_libGraphicsMagickWand_la_OBJECTS)
14391451 wand_libGraphicsMagickWand_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
@@ -1644,6 +1656,7 @@
16441656 coders/$(DEPDIR)/gif_la-gif.Plo \
16451657 coders/$(DEPDIR)/gradient_la-gradient.Plo \
16461658 coders/$(DEPDIR)/gray_la-gray.Plo \
1659+ coders/$(DEPDIR)/heif_la-heif.Plo \
16471660 coders/$(DEPDIR)/histogram_la-histogram.Plo \
16481661 coders/$(DEPDIR)/hrz_la-hrz.Plo \
16491662 coders/$(DEPDIR)/html_la-html.Plo \
@@ -1681,6 +1694,7 @@
16811694 coders/$(DEPDIR)/magick_libGraphicsMagick_la-gif.Plo \
16821695 coders/$(DEPDIR)/magick_libGraphicsMagick_la-gradient.Plo \
16831696 coders/$(DEPDIR)/magick_libGraphicsMagick_la-gray.Plo \
1697+ coders/$(DEPDIR)/magick_libGraphicsMagick_la-heif.Plo \
16841698 coders/$(DEPDIR)/magick_libGraphicsMagick_la-histogram.Plo \
16851699 coders/$(DEPDIR)/magick_libGraphicsMagick_la-hrz.Plo \
16861700 coders/$(DEPDIR)/magick_libGraphicsMagick_la-html.Plo \
@@ -1965,46 +1979,47 @@
19651979 $(coders_ept_la_SOURCES) $(coders_fax_la_SOURCES) \
19661980 $(coders_fits_la_SOURCES) $(coders_fpx_la_SOURCES) \
19671981 $(coders_gif_la_SOURCES) $(coders_gradient_la_SOURCES) \
1968- $(coders_gray_la_SOURCES) $(coders_histogram_la_SOURCES) \
1969- $(coders_hrz_la_SOURCES) $(coders_html_la_SOURCES) \
1970- $(coders_icon_la_SOURCES) $(coders_identity_la_SOURCES) \
1971- $(coders_info_la_SOURCES) $(coders_jbig_la_SOURCES) \
1972- $(coders_jnx_la_SOURCES) $(coders_jp2_la_SOURCES) \
1973- $(coders_jpeg_la_SOURCES) $(coders_label_la_SOURCES) \
1974- $(coders_locale_la_SOURCES) $(coders_logo_la_SOURCES) \
1975- $(coders_mac_la_SOURCES) $(coders_map_la_SOURCES) \
1976- $(coders_mat_la_SOURCES) $(coders_matte_la_SOURCES) \
1977- $(coders_meta_la_SOURCES) $(coders_miff_la_SOURCES) \
1978- $(coders_mono_la_SOURCES) $(coders_mpc_la_SOURCES) \
1979- $(coders_mpeg_la_SOURCES) $(coders_mpr_la_SOURCES) \
1980- $(coders_msl_la_SOURCES) $(coders_mtv_la_SOURCES) \
1981- $(coders_mvg_la_SOURCES) $(coders_null_la_SOURCES) \
1982- $(coders_otb_la_SOURCES) $(coders_palm_la_SOURCES) \
1983- $(coders_pcd_la_SOURCES) $(coders_pcl_la_SOURCES) \
1984- $(coders_pcx_la_SOURCES) $(coders_pdb_la_SOURCES) \
1985- $(coders_pdf_la_SOURCES) $(coders_pict_la_SOURCES) \
1986- $(coders_pix_la_SOURCES) $(coders_plasma_la_SOURCES) \
1987- $(coders_png_la_SOURCES) $(coders_pnm_la_SOURCES) \
1988- $(coders_preview_la_SOURCES) $(coders_ps_la_SOURCES) \
1989- $(coders_ps2_la_SOURCES) $(coders_ps3_la_SOURCES) \
1990- $(coders_psd_la_SOURCES) $(coders_pwp_la_SOURCES) \
1991- $(coders_rgb_la_SOURCES) $(coders_rla_la_SOURCES) \
1992- $(coders_rle_la_SOURCES) $(coders_sct_la_SOURCES) \
1993- $(coders_sfw_la_SOURCES) $(coders_sgi_la_SOURCES) \
1994- $(coders_stegano_la_SOURCES) $(coders_sun_la_SOURCES) \
1995- $(coders_svg_la_SOURCES) $(coders_tga_la_SOURCES) \
1996- $(coders_tiff_la_SOURCES) $(coders_tile_la_SOURCES) \
1997- $(coders_tim_la_SOURCES) $(coders_topol_la_SOURCES) \
1998- $(coders_ttf_la_SOURCES) $(coders_txt_la_SOURCES) \
1999- $(coders_uil_la_SOURCES) $(coders_url_la_SOURCES) \
2000- $(coders_uyvy_la_SOURCES) $(coders_vicar_la_SOURCES) \
2001- $(coders_vid_la_SOURCES) $(coders_viff_la_SOURCES) \
2002- $(coders_wbmp_la_SOURCES) $(coders_webp_la_SOURCES) \
2003- $(coders_wmf_la_SOURCES) $(coders_wpg_la_SOURCES) \
2004- $(coders_x_la_SOURCES) $(coders_xbm_la_SOURCES) \
2005- $(coders_xc_la_SOURCES) $(coders_xcf_la_SOURCES) \
2006- $(coders_xpm_la_SOURCES) $(coders_xwd_la_SOURCES) \
2007- $(coders_yuv_la_SOURCES) $(filters_analyze_la_SOURCES) \
1982+ $(coders_gray_la_SOURCES) $(coders_heif_la_SOURCES) \
1983+ $(coders_histogram_la_SOURCES) $(coders_hrz_la_SOURCES) \
1984+ $(coders_html_la_SOURCES) $(coders_icon_la_SOURCES) \
1985+ $(coders_identity_la_SOURCES) $(coders_info_la_SOURCES) \
1986+ $(coders_jbig_la_SOURCES) $(coders_jnx_la_SOURCES) \
1987+ $(coders_jp2_la_SOURCES) $(coders_jpeg_la_SOURCES) \
1988+ $(coders_label_la_SOURCES) $(coders_locale_la_SOURCES) \
1989+ $(coders_logo_la_SOURCES) $(coders_mac_la_SOURCES) \
1990+ $(coders_map_la_SOURCES) $(coders_mat_la_SOURCES) \
1991+ $(coders_matte_la_SOURCES) $(coders_meta_la_SOURCES) \
1992+ $(coders_miff_la_SOURCES) $(coders_mono_la_SOURCES) \
1993+ $(coders_mpc_la_SOURCES) $(coders_mpeg_la_SOURCES) \
1994+ $(coders_mpr_la_SOURCES) $(coders_msl_la_SOURCES) \
1995+ $(coders_mtv_la_SOURCES) $(coders_mvg_la_SOURCES) \
1996+ $(coders_null_la_SOURCES) $(coders_otb_la_SOURCES) \
1997+ $(coders_palm_la_SOURCES) $(coders_pcd_la_SOURCES) \
1998+ $(coders_pcl_la_SOURCES) $(coders_pcx_la_SOURCES) \
1999+ $(coders_pdb_la_SOURCES) $(coders_pdf_la_SOURCES) \
2000+ $(coders_pict_la_SOURCES) $(coders_pix_la_SOURCES) \
2001+ $(coders_plasma_la_SOURCES) $(coders_png_la_SOURCES) \
2002+ $(coders_pnm_la_SOURCES) $(coders_preview_la_SOURCES) \
2003+ $(coders_ps_la_SOURCES) $(coders_ps2_la_SOURCES) \
2004+ $(coders_ps3_la_SOURCES) $(coders_psd_la_SOURCES) \
2005+ $(coders_pwp_la_SOURCES) $(coders_rgb_la_SOURCES) \
2006+ $(coders_rla_la_SOURCES) $(coders_rle_la_SOURCES) \
2007+ $(coders_sct_la_SOURCES) $(coders_sfw_la_SOURCES) \
2008+ $(coders_sgi_la_SOURCES) $(coders_stegano_la_SOURCES) \
2009+ $(coders_sun_la_SOURCES) $(coders_svg_la_SOURCES) \
2010+ $(coders_tga_la_SOURCES) $(coders_tiff_la_SOURCES) \
2011+ $(coders_tile_la_SOURCES) $(coders_tim_la_SOURCES) \
2012+ $(coders_topol_la_SOURCES) $(coders_ttf_la_SOURCES) \
2013+ $(coders_txt_la_SOURCES) $(coders_uil_la_SOURCES) \
2014+ $(coders_url_la_SOURCES) $(coders_uyvy_la_SOURCES) \
2015+ $(coders_vicar_la_SOURCES) $(coders_vid_la_SOURCES) \
2016+ $(coders_viff_la_SOURCES) $(coders_wbmp_la_SOURCES) \
2017+ $(coders_webp_la_SOURCES) $(coders_wmf_la_SOURCES) \
2018+ $(coders_wpg_la_SOURCES) $(coders_x_la_SOURCES) \
2019+ $(coders_xbm_la_SOURCES) $(coders_xc_la_SOURCES) \
2020+ $(coders_xcf_la_SOURCES) $(coders_xpm_la_SOURCES) \
2021+ $(coders_xwd_la_SOURCES) $(coders_yuv_la_SOURCES) \
2022+ $(filters_analyze_la_SOURCES) \
20082023 $(magick_libGraphicsMagick_la_SOURCES) \
20092024 $(wand_libGraphicsMagickWand_la_SOURCES) \
20102025 $(Magick___demo_analyze_SOURCES) \
@@ -2042,46 +2057,47 @@
20422057 $(coders_ept_la_SOURCES) $(coders_fax_la_SOURCES) \
20432058 $(coders_fits_la_SOURCES) $(coders_fpx_la_SOURCES) \
20442059 $(coders_gif_la_SOURCES) $(coders_gradient_la_SOURCES) \
2045- $(coders_gray_la_SOURCES) $(coders_histogram_la_SOURCES) \
2046- $(coders_hrz_la_SOURCES) $(coders_html_la_SOURCES) \
2047- $(coders_icon_la_SOURCES) $(coders_identity_la_SOURCES) \
2048- $(coders_info_la_SOURCES) $(coders_jbig_la_SOURCES) \
2049- $(coders_jnx_la_SOURCES) $(coders_jp2_la_SOURCES) \
2050- $(coders_jpeg_la_SOURCES) $(coders_label_la_SOURCES) \
2051- $(coders_locale_la_SOURCES) $(coders_logo_la_SOURCES) \
2052- $(coders_mac_la_SOURCES) $(coders_map_la_SOURCES) \
2053- $(coders_mat_la_SOURCES) $(coders_matte_la_SOURCES) \
2054- $(coders_meta_la_SOURCES) $(coders_miff_la_SOURCES) \
2055- $(coders_mono_la_SOURCES) $(coders_mpc_la_SOURCES) \
2056- $(coders_mpeg_la_SOURCES) $(coders_mpr_la_SOURCES) \
2057- $(coders_msl_la_SOURCES) $(coders_mtv_la_SOURCES) \
2058- $(coders_mvg_la_SOURCES) $(coders_null_la_SOURCES) \
2059- $(coders_otb_la_SOURCES) $(coders_palm_la_SOURCES) \
2060- $(coders_pcd_la_SOURCES) $(coders_pcl_la_SOURCES) \
2061- $(coders_pcx_la_SOURCES) $(coders_pdb_la_SOURCES) \
2062- $(coders_pdf_la_SOURCES) $(coders_pict_la_SOURCES) \
2063- $(coders_pix_la_SOURCES) $(coders_plasma_la_SOURCES) \
2064- $(coders_png_la_SOURCES) $(coders_pnm_la_SOURCES) \
2065- $(coders_preview_la_SOURCES) $(coders_ps_la_SOURCES) \
2066- $(coders_ps2_la_SOURCES) $(coders_ps3_la_SOURCES) \
2067- $(coders_psd_la_SOURCES) $(coders_pwp_la_SOURCES) \
2068- $(coders_rgb_la_SOURCES) $(coders_rla_la_SOURCES) \
2069- $(coders_rle_la_SOURCES) $(coders_sct_la_SOURCES) \
2070- $(coders_sfw_la_SOURCES) $(coders_sgi_la_SOURCES) \
2071- $(coders_stegano_la_SOURCES) $(coders_sun_la_SOURCES) \
2072- $(coders_svg_la_SOURCES) $(coders_tga_la_SOURCES) \
2073- $(coders_tiff_la_SOURCES) $(coders_tile_la_SOURCES) \
2074- $(coders_tim_la_SOURCES) $(coders_topol_la_SOURCES) \
2075- $(coders_ttf_la_SOURCES) $(coders_txt_la_SOURCES) \
2076- $(coders_uil_la_SOURCES) $(coders_url_la_SOURCES) \
2077- $(coders_uyvy_la_SOURCES) $(coders_vicar_la_SOURCES) \
2078- $(coders_vid_la_SOURCES) $(coders_viff_la_SOURCES) \
2079- $(coders_wbmp_la_SOURCES) $(coders_webp_la_SOURCES) \
2080- $(coders_wmf_la_SOURCES) $(coders_wpg_la_SOURCES) \
2081- $(coders_x_la_SOURCES) $(coders_xbm_la_SOURCES) \
2082- $(coders_xc_la_SOURCES) $(coders_xcf_la_SOURCES) \
2083- $(coders_xpm_la_SOURCES) $(coders_xwd_la_SOURCES) \
2084- $(coders_yuv_la_SOURCES) $(filters_analyze_la_SOURCES) \
2060+ $(coders_gray_la_SOURCES) $(coders_heif_la_SOURCES) \
2061+ $(coders_histogram_la_SOURCES) $(coders_hrz_la_SOURCES) \
2062+ $(coders_html_la_SOURCES) $(coders_icon_la_SOURCES) \
2063+ $(coders_identity_la_SOURCES) $(coders_info_la_SOURCES) \
2064+ $(coders_jbig_la_SOURCES) $(coders_jnx_la_SOURCES) \
2065+ $(coders_jp2_la_SOURCES) $(coders_jpeg_la_SOURCES) \
2066+ $(coders_label_la_SOURCES) $(coders_locale_la_SOURCES) \
2067+ $(coders_logo_la_SOURCES) $(coders_mac_la_SOURCES) \
2068+ $(coders_map_la_SOURCES) $(coders_mat_la_SOURCES) \
2069+ $(coders_matte_la_SOURCES) $(coders_meta_la_SOURCES) \
2070+ $(coders_miff_la_SOURCES) $(coders_mono_la_SOURCES) \
2071+ $(coders_mpc_la_SOURCES) $(coders_mpeg_la_SOURCES) \
2072+ $(coders_mpr_la_SOURCES) $(coders_msl_la_SOURCES) \
2073+ $(coders_mtv_la_SOURCES) $(coders_mvg_la_SOURCES) \
2074+ $(coders_null_la_SOURCES) $(coders_otb_la_SOURCES) \
2075+ $(coders_palm_la_SOURCES) $(coders_pcd_la_SOURCES) \
2076+ $(coders_pcl_la_SOURCES) $(coders_pcx_la_SOURCES) \
2077+ $(coders_pdb_la_SOURCES) $(coders_pdf_la_SOURCES) \
2078+ $(coders_pict_la_SOURCES) $(coders_pix_la_SOURCES) \
2079+ $(coders_plasma_la_SOURCES) $(coders_png_la_SOURCES) \
2080+ $(coders_pnm_la_SOURCES) $(coders_preview_la_SOURCES) \
2081+ $(coders_ps_la_SOURCES) $(coders_ps2_la_SOURCES) \
2082+ $(coders_ps3_la_SOURCES) $(coders_psd_la_SOURCES) \
2083+ $(coders_pwp_la_SOURCES) $(coders_rgb_la_SOURCES) \
2084+ $(coders_rla_la_SOURCES) $(coders_rle_la_SOURCES) \
2085+ $(coders_sct_la_SOURCES) $(coders_sfw_la_SOURCES) \
2086+ $(coders_sgi_la_SOURCES) $(coders_stegano_la_SOURCES) \
2087+ $(coders_sun_la_SOURCES) $(coders_svg_la_SOURCES) \
2088+ $(coders_tga_la_SOURCES) $(coders_tiff_la_SOURCES) \
2089+ $(coders_tile_la_SOURCES) $(coders_tim_la_SOURCES) \
2090+ $(coders_topol_la_SOURCES) $(coders_ttf_la_SOURCES) \
2091+ $(coders_txt_la_SOURCES) $(coders_uil_la_SOURCES) \
2092+ $(coders_url_la_SOURCES) $(coders_uyvy_la_SOURCES) \
2093+ $(coders_vicar_la_SOURCES) $(coders_vid_la_SOURCES) \
2094+ $(coders_viff_la_SOURCES) $(coders_wbmp_la_SOURCES) \
2095+ $(coders_webp_la_SOURCES) $(coders_wmf_la_SOURCES) \
2096+ $(coders_wpg_la_SOURCES) $(coders_x_la_SOURCES) \
2097+ $(coders_xbm_la_SOURCES) $(coders_xc_la_SOURCES) \
2098+ $(coders_xcf_la_SOURCES) $(coders_xpm_la_SOURCES) \
2099+ $(coders_xwd_la_SOURCES) $(coders_yuv_la_SOURCES) \
2100+ $(filters_analyze_la_SOURCES) \
20852101 $(am__magick_libGraphicsMagick_la_SOURCES_DIST) \
20862102 $(wand_libGraphicsMagickWand_la_SOURCES) \
20872103 $(Magick___demo_analyze_SOURCES) \
@@ -2484,6 +2500,7 @@
24842500 LIB_DPS = @LIB_DPS@
24852501 LIB_FPX = @LIB_FPX@
24862502 LIB_GDI32 = @LIB_GDI32@
2503+LIB_HEIF = @LIB_HEIF@
24872504 LIB_JBIG = @LIB_JBIG@
24882505 LIB_JP2 = @LIB_JP2@
24892506 LIB_JPEG = @LIB_JPEG@
@@ -2685,6 +2702,7 @@
26852702 prefix = @prefix@
26862703 program_transform_name = @program_transform_name@
26872704 psdir = @psdir@
2705+runstatedir = @runstatedir@
26882706 sbindir = @sbindir@
26892707 sharedstatedir = @sharedstatedir@
26902708 srcdir = @srcdir@
@@ -2867,6 +2885,8 @@
28672885 @HasX11_TRUE@MAGICK_X11_CODER_SRCS = coders/x.c coders/xwd.c
28682886 @HasWEBP_TRUE@MAGICK_WEBP_MODULES = coders/webp.la
28692887 @HasWEBP_TRUE@MAGICK_WEBP_SRCS = coders/webp.c
2888+@HasHEIF_TRUE@MAGICK_HEIF_MODULES = coders/heif.la
2889+@HasHEIF_TRUE@MAGICK_HEIF_SRCS = coders/heif.c
28702890 @ENABLE_BROKEN_CODERS_TRUE@MAGICK_BROKEN_MODULES = coders/psd.la
28712891 @ENABLE_BROKEN_CODERS_TRUE@MAGICK_BROKEN_SRCS = coders/psd.c
28722892 MAGICK_CODER_CPPFLAGS = \
@@ -2970,7 +2990,8 @@
29702990 $(MAGICK_JP2_SRCS) \
29712991 $(MAGICK_TIFF_SRCS) \
29722992 $(MAGICK_X11_CODER_SRCS) \
2973- $(MAGICK_WEBP_SRCS)
2993+ $(MAGICK_WEBP_SRCS) \
2994+ $(MAGICK_HEIF_SRCS)
29742995
29752996 @WITH_MODULES_FALSE@coders_LTLIBRARIES =
29762997 @WITH_MODULES_TRUE@coders_LTLIBRARIES = \
@@ -3064,7 +3085,7 @@
30643085 @WITH_MODULES_TRUE@ $(MAGICK_DPS_MODULES) $(MAGICK_FPX_MODULES) $(MAGICK_GDI32_MODULES) \
30653086 @WITH_MODULES_TRUE@ $(MAGICK_JBIG_MODULES) $(MAGICK_JPEG_MODULES) $(MAGICK_JP2_MODULES) \
30663087 @WITH_MODULES_TRUE@ $(MAGICK_PNG_MODULES) $(MAGICK_TIFF_MODULES) $(MAGICK_X11_CODER_MODULES) \
3067-@WITH_MODULES_TRUE@ $(MAGICK_WEBP_MODULES)
3088+@WITH_MODULES_TRUE@ $(MAGICK_WEBP_MODULES) $(MAGICK_HEIF_MODULES)
30683089
30693090
30703091 # ART coder module
@@ -3672,6 +3693,12 @@
36723693 coders_webp_la_CPPFLAGS = $(MAGICK_CODER_CPPFLAGS)
36733694 coders_webp_la_LDFLAGS = $(MODULECOMMONFLAGS)
36743695 coders_webp_la_LIBADD = $(LIBMAGICK) $(LIB_WEBP)
3696+
3697+# HEIF coder module
3698+coders_heif_la_SOURCES = coders/heif.c
3699+coders_heif_la_CPPFLAGS = $(MAGICK_CODER_CPPFLAGS)
3700+coders_heif_la_LDFLAGS = $(MODULECOMMONFLAGS)
3701+coders_heif_la_LIBADD = $(LIBMAGICK) $(LIB_HEIF)
36753702 magickincdir = $(topincludedir)/magick
36763703
36773704 # Headers which are installed
@@ -5332,6 +5359,11 @@
53325359
53335360 coders/gray.la: $(coders_gray_la_OBJECTS) $(coders_gray_la_DEPENDENCIES) $(EXTRA_coders_gray_la_DEPENDENCIES) coders/$(am__dirstamp)
53345361 $(AM_V_CCLD)$(coders_gray_la_LINK) $(am_coders_gray_la_rpath) $(coders_gray_la_OBJECTS) $(coders_gray_la_LIBADD) $(LIBS)
5362+coders/heif_la-heif.lo: coders/$(am__dirstamp) \
5363+ coders/$(DEPDIR)/$(am__dirstamp)
5364+
5365+coders/heif.la: $(coders_heif_la_OBJECTS) $(coders_heif_la_DEPENDENCIES) $(EXTRA_coders_heif_la_DEPENDENCIES) coders/$(am__dirstamp)
5366+ $(AM_V_CCLD)$(coders_heif_la_LINK) $(am_coders_heif_la_rpath) $(coders_heif_la_OBJECTS) $(coders_heif_la_LIBADD) $(LIBS)
53355367 coders/histogram_la-histogram.lo: coders/$(am__dirstamp) \
53365368 coders/$(DEPDIR)/$(am__dirstamp)
53375369
@@ -6103,6 +6135,8 @@
61036135 coders/$(DEPDIR)/$(am__dirstamp)
61046136 coders/magick_libGraphicsMagick_la-webp.lo: coders/$(am__dirstamp) \
61056137 coders/$(DEPDIR)/$(am__dirstamp)
6138+coders/magick_libGraphicsMagick_la-heif.lo: coders/$(am__dirstamp) \
6139+ coders/$(DEPDIR)/$(am__dirstamp)
61066140 filters/magick_libGraphicsMagick_la-analyze.lo: \
61076141 filters/$(am__dirstamp) filters/$(DEPDIR)/$(am__dirstamp)
61086142
@@ -6459,6 +6493,7 @@
64596493 @AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/gif_la-gif.Plo@am__quote@ # am--include-marker
64606494 @AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/gradient_la-gradient.Plo@am__quote@ # am--include-marker
64616495 @AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/gray_la-gray.Plo@am__quote@ # am--include-marker
6496+@AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/heif_la-heif.Plo@am__quote@ # am--include-marker
64626497 @AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/histogram_la-histogram.Plo@am__quote@ # am--include-marker
64636498 @AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/hrz_la-hrz.Plo@am__quote@ # am--include-marker
64646499 @AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/html_la-html.Plo@am__quote@ # am--include-marker
@@ -6496,6 +6531,7 @@
64966531 @AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/magick_libGraphicsMagick_la-gif.Plo@am__quote@ # am--include-marker
64976532 @AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/magick_libGraphicsMagick_la-gradient.Plo@am__quote@ # am--include-marker
64986533 @AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/magick_libGraphicsMagick_la-gray.Plo@am__quote@ # am--include-marker
6534+@AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/magick_libGraphicsMagick_la-heif.Plo@am__quote@ # am--include-marker
64996535 @AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/magick_libGraphicsMagick_la-histogram.Plo@am__quote@ # am--include-marker
65006536 @AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/magick_libGraphicsMagick_la-hrz.Plo@am__quote@ # am--include-marker
65016537 @AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/magick_libGraphicsMagick_la-html.Plo@am__quote@ # am--include-marker
@@ -6919,6 +6955,13 @@
69196955 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
69206956 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(coders_gray_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o coders/gray_la-gray.lo `test -f 'coders/gray.c' || echo '$(srcdir)/'`coders/gray.c
69216957
6958+coders/heif_la-heif.lo: coders/heif.c
6959+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(coders_heif_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT coders/heif_la-heif.lo -MD -MP -MF coders/$(DEPDIR)/heif_la-heif.Tpo -c -o coders/heif_la-heif.lo `test -f 'coders/heif.c' || echo '$(srcdir)/'`coders/heif.c
6960+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) coders/$(DEPDIR)/heif_la-heif.Tpo coders/$(DEPDIR)/heif_la-heif.Plo
6961+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='coders/heif.c' object='coders/heif_la-heif.lo' libtool=yes @AMDEPBACKSLASH@
6962+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
6963+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(coders_heif_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o coders/heif_la-heif.lo `test -f 'coders/heif.c' || echo '$(srcdir)/'`coders/heif.c
6964+
69226965 coders/histogram_la-histogram.lo: coders/histogram.c
69236966 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(coders_histogram_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT coders/histogram_la-histogram.lo -MD -MP -MF coders/$(DEPDIR)/histogram_la-histogram.Tpo -c -o coders/histogram_la-histogram.lo `test -f 'coders/histogram.c' || echo '$(srcdir)/'`coders/histogram.c
69246967 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) coders/$(DEPDIR)/histogram_la-histogram.Tpo coders/$(DEPDIR)/histogram_la-histogram.Plo
@@ -8746,6 +8789,13 @@
87468789 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
87478790 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(magick_libGraphicsMagick_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o coders/magick_libGraphicsMagick_la-webp.lo `test -f 'coders/webp.c' || echo '$(srcdir)/'`coders/webp.c
87488791
8792+coders/magick_libGraphicsMagick_la-heif.lo: coders/heif.c
8793+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(magick_libGraphicsMagick_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT coders/magick_libGraphicsMagick_la-heif.lo -MD -MP -MF coders/$(DEPDIR)/magick_libGraphicsMagick_la-heif.Tpo -c -o coders/magick_libGraphicsMagick_la-heif.lo `test -f 'coders/heif.c' || echo '$(srcdir)/'`coders/heif.c
8794+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) coders/$(DEPDIR)/magick_libGraphicsMagick_la-heif.Tpo coders/$(DEPDIR)/magick_libGraphicsMagick_la-heif.Plo
8795+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='coders/heif.c' object='coders/magick_libGraphicsMagick_la-heif.lo' libtool=yes @AMDEPBACKSLASH@
8796+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
8797+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(magick_libGraphicsMagick_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o coders/magick_libGraphicsMagick_la-heif.lo `test -f 'coders/heif.c' || echo '$(srcdir)/'`coders/heif.c
8798+
87498799 filters/magick_libGraphicsMagick_la-analyze.lo: filters/analyze.c
87508800 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(magick_libGraphicsMagick_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT filters/magick_libGraphicsMagick_la-analyze.lo -MD -MP -MF filters/$(DEPDIR)/magick_libGraphicsMagick_la-analyze.Tpo -c -o filters/magick_libGraphicsMagick_la-analyze.lo `test -f 'filters/analyze.c' || echo '$(srcdir)/'`filters/analyze.c
87518801 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) filters/$(DEPDIR)/magick_libGraphicsMagick_la-analyze.Tpo filters/$(DEPDIR)/magick_libGraphicsMagick_la-analyze.Plo
@@ -10194,6 +10244,7 @@
1019410244 -rm -f coders/$(DEPDIR)/gif_la-gif.Plo
1019510245 -rm -f coders/$(DEPDIR)/gradient_la-gradient.Plo
1019610246 -rm -f coders/$(DEPDIR)/gray_la-gray.Plo
10247+ -rm -f coders/$(DEPDIR)/heif_la-heif.Plo
1019710248 -rm -f coders/$(DEPDIR)/histogram_la-histogram.Plo
1019810249 -rm -f coders/$(DEPDIR)/hrz_la-hrz.Plo
1019910250 -rm -f coders/$(DEPDIR)/html_la-html.Plo
@@ -10231,6 +10282,7 @@
1023110282 -rm -f coders/$(DEPDIR)/magick_libGraphicsMagick_la-gif.Plo
1023210283 -rm -f coders/$(DEPDIR)/magick_libGraphicsMagick_la-gradient.Plo
1023310284 -rm -f coders/$(DEPDIR)/magick_libGraphicsMagick_la-gray.Plo
10285+ -rm -f coders/$(DEPDIR)/magick_libGraphicsMagick_la-heif.Plo
1023410286 -rm -f coders/$(DEPDIR)/magick_libGraphicsMagick_la-histogram.Plo
1023510287 -rm -f coders/$(DEPDIR)/magick_libGraphicsMagick_la-hrz.Plo
1023610288 -rm -f coders/$(DEPDIR)/magick_libGraphicsMagick_la-html.Plo
@@ -10582,6 +10634,7 @@
1058210634 -rm -f coders/$(DEPDIR)/gif_la-gif.Plo
1058310635 -rm -f coders/$(DEPDIR)/gradient_la-gradient.Plo
1058410636 -rm -f coders/$(DEPDIR)/gray_la-gray.Plo
10637+ -rm -f coders/$(DEPDIR)/heif_la-heif.Plo
1058510638 -rm -f coders/$(DEPDIR)/histogram_la-histogram.Plo
1058610639 -rm -f coders/$(DEPDIR)/hrz_la-hrz.Plo
1058710640 -rm -f coders/$(DEPDIR)/html_la-html.Plo
@@ -10619,6 +10672,7 @@
1061910672 -rm -f coders/$(DEPDIR)/magick_libGraphicsMagick_la-gif.Plo
1062010673 -rm -f coders/$(DEPDIR)/magick_libGraphicsMagick_la-gradient.Plo
1062110674 -rm -f coders/$(DEPDIR)/magick_libGraphicsMagick_la-gray.Plo
10675+ -rm -f coders/$(DEPDIR)/magick_libGraphicsMagick_la-heif.Plo
1062210676 -rm -f coders/$(DEPDIR)/magick_libGraphicsMagick_la-histogram.Plo
1062310677 -rm -f coders/$(DEPDIR)/magick_libGraphicsMagick_la-hrz.Plo
1062410678 -rm -f coders/$(DEPDIR)/magick_libGraphicsMagick_la-html.Plo
diff -r 48c9416cca66 -r 9164b6c0f0a6 README.txt
--- a/README.txt Mon May 10 11:16:24 2021 -0500
+++ b/README.txt Mon Jul 12 11:16:33 2021 +0200
@@ -394,3 +394,9 @@
394394 https://github.com/ebiggers/libdeflate). Linking with this
395395 library may be necessary for builds where libtiff depends on
396396 libdeflate.
397+
398+* GraphicsMagick requires the heif library from
399+
400+ https://github.com/strukturag/libheif
401+
402+ to read heif/heic files.
diff -r 48c9416cca66 -r 9164b6c0f0a6 coders/Makefile.am
--- a/coders/Makefile.am Mon May 10 11:16:24 2021 -0500
+++ b/coders/Makefile.am Mon Jul 12 11:16:33 2021 +0200
@@ -61,6 +61,11 @@
6161 MAGICK_WEBP_SRCS = coders/webp.c
6262 endif
6363
64+if HasHEIF
65+MAGICK_HEIF_MODULES = coders/heif.la
66+MAGICK_HEIF_SRCS = coders/heif.c
67+endif
68+
6469 if ENABLE_BROKEN_CODERS
6570 MAGICK_BROKEN_MODULES = coders/psd.la
6671 MAGICK_BROKEN_SRCS = coders/psd.c
@@ -167,7 +172,8 @@
167172 $(MAGICK_JP2_SRCS) \
168173 $(MAGICK_TIFF_SRCS) \
169174 $(MAGICK_X11_CODER_SRCS) \
170- $(MAGICK_WEBP_SRCS)
175+ $(MAGICK_WEBP_SRCS) \
176+ $(MAGICK_HEIF_SRCS)
171177
172178 if WITH_MODULES
173179 coders_LTLIBRARIES = \
@@ -261,7 +267,7 @@
261267 $(MAGICK_DPS_MODULES) $(MAGICK_FPX_MODULES) $(MAGICK_GDI32_MODULES) \
262268 $(MAGICK_JBIG_MODULES) $(MAGICK_JPEG_MODULES) $(MAGICK_JP2_MODULES) \
263269 $(MAGICK_PNG_MODULES) $(MAGICK_TIFF_MODULES) $(MAGICK_X11_CODER_MODULES) \
264- $(MAGICK_WEBP_MODULES)
270+ $(MAGICK_WEBP_MODULES) $(MAGICK_HEIF_MODULES)
265271 else
266272 coders_LTLIBRARIES =
267273 endif # WITH_MODULES
@@ -871,3 +877,9 @@
871877 coders_webp_la_CPPFLAGS = $(MAGICK_CODER_CPPFLAGS)
872878 coders_webp_la_LDFLAGS = $(MODULECOMMONFLAGS)
873879 coders_webp_la_LIBADD = $(LIBMAGICK) $(LIB_WEBP)
880+
881+# HEIF coder module
882+coders_heif_la_SOURCES = coders/heif.c
883+coders_heif_la_CPPFLAGS = $(MAGICK_CODER_CPPFLAGS)
884+coders_heif_la_LDFLAGS = $(MODULECOMMONFLAGS)
885+coders_heif_la_LIBADD = $(LIBMAGICK) $(LIB_HEIF)
diff -r 48c9416cca66 -r 9164b6c0f0a6 coders/heif.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/coders/heif.c Mon Jul 12 11:16:33 2021 +0200
@@ -0,0 +1,373 @@
1+/*
2+% Copyright (C) 2021 GraphicsMagick Group
3+%
4+% This program is covered by multiple licenses, which are described in
5+% Copyright.txt. You should have received a copy of Copyright.txt with this
6+% package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
7+%
8+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9+% %
10+% %
11+% H H EEEEE I FFFFF %
12+% H H E I F %
13+% HHHHH EEEEE I FFFF %
14+% H H E I F %
15+% H H EEEEE I F %
16+% %
17+% Read Heif/Heic Image Format. %
18+% %
19+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20+* Status: Support for reading a single image.
21+*/
22+
23+#include "magick/studio.h"
24+#include "magick/blob.h"
25+#include "magick/colormap.h"
26+#include "magick/log.h"
27+#include "magick/constitute.h"
28+#include "magick/magick.h"
29+#include "magick/monitor.h"
30+#include "magick/pixel_cache.h"
31+#include "magick/profile.h"
32+#include "magick/utility.h"
33+#include "magick/resource.h"
34+
35+#if defined(HasHEIF)
36+#include <libheif/heif.h>
37+
38+/*
39+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
40+% %
41+% %
42+% %
43+% R e a d H E I F I m a g e %
44+% %
45+% %
46+% %
47+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
48+%
49+% ReadHEIFImage() reads an image in the HEIF image format.
50+%
51+% The format of the ReadHEIFImage method is:
52+%
53+% Image *ReadHEIFImage(const ImageInfo *image_info,
54+% ExceptionInfo *exception)
55+%
56+% A description of each parameter follows:
57+%
58+% o image_info: the image info.
59+%
60+% o exception: return any errors or warnings in this structure.
61+%
62+*/
63+
64+#define HEIFReadCleanup() \
65+ if(heif_image) heif_image_release(heif_image); \
66+ if(heif_image_handle) heif_image_handle_release(heif_image_handle); \
67+ if(heif) heif_context_free(heif); \
68+ MagickFreeResourceLimitedMemory(in_buf);
69+
70+#define ThrowHEIFReaderException(code_,reason_,image_) \
71+{ \
72+ HEIFReadCleanup() \
73+ ThrowReaderException(code_,reason_,image_); \
74+}
75+
76+
77+static Image *ReadMetadata(struct heif_image_handle *heif_image_handle,
78+ Image *image, ExceptionInfo *exception)
79+{
80+ int
81+ count;
82+
83+ heif_item_id
84+ *ids;
85+
86+ count=heif_image_handle_get_number_of_metadata_blocks(heif_image_handle, NULL);
87+ if(count==0)
88+ return image;
89+
90+ ids=MagickAllocateResourceLimitedArray(heif_item_id *,count,sizeof(*ids));
91+ if(ids == (heif_item_id *) NULL)
92+ ThrowReaderException(ResourceLimitError,MemoryAllocationFailed,image);
93+
94+ count=heif_image_handle_get_list_of_metadata_block_IDs(heif_image_handle, NULL,
95+ ids,count);
96+
97+ for(int i=0; i<count;i++) {
98+ const char*
99+ profile_name=heif_image_handle_get_metadata_type(heif_image_handle,ids[i]);
100+
101+ size_t
102+ profile_size=heif_image_handle_get_metadata_size(heif_image_handle,ids[i]);
103+
104+ unsigned char*
105+ profile;
106+
107+ profile=MagickAllocateResourceLimitedArray(unsigned char*,profile_size,
108+ sizeof(*profile));
109+ if(profile == (unsigned char*) NULL) {
110+ MagickFreeResourceLimitedMemory(ids);
111+ ThrowReaderException(ResourceLimitError,MemoryAllocationFailed,image);
112+ }
113+
114+ struct heif_error
115+ err=heif_image_handle_get_metadata(heif_image_handle,ids[i],profile);
116+
117+ if(err.code != heif_error_Ok) {
118+ MagickFreeResourceLimitedMemory(profile);
119+ MagickFreeResourceLimitedMemory(ids);
120+ ThrowReaderException(CorruptImageError,
121+ AnErrorHasOccurredReadingFromFile,image);
122+ }
123+
124+ if(strncmp(profile_name,"Exif",4) == 0 && profile_size > 4) {
125+ // skip TIFF-Header
126+ SetImageProfile(image,profile_name,profile+4,profile_size-4);
127+ } else {
128+ SetImageProfile(image,profile_name,profile,profile_size);
129+ }
130+ MagickFreeResourceLimitedMemory(profile);
131+ }
132+ MagickFreeResourceLimitedMemory(ids);
133+ return image;
134+}
135+
136+static Image *ReadHEIFImage(const ImageInfo *image_info,
137+ ExceptionInfo *exception)
138+{
139+ Image
140+ *image;
141+
142+ struct heif_context
143+ *heif = NULL;
144+
145+ struct heif_error
146+ heif_status;
147+
148+ struct heif_image_handle
149+ *heif_image_handle = NULL;
150+
151+ struct heif_image
152+ *heif_image = NULL;
153+
154+ size_t
155+ in_len;
156+
157+ int
158+ row_stride;
159+
160+ unsigned char
161+ *in_buf = NULL;
162+
163+ const uint8_t
164+ *pixels = NULL;
165+
166+ long
167+ x,
168+ y;
169+
170+ PixelPacket
171+ *q;
172+
173+ assert(image_info != (const ImageInfo *) NULL);
174+ assert(image_info->signature == MagickSignature);
175+ assert(exception != (ExceptionInfo *) NULL);
176+ assert(exception->signature == MagickSignature);
177+
178+ /*
179+ Open image file.
180+ */
181+ image=AllocateImage(image_info);
182+ if (image == (Image *) NULL)
183+ ThrowReaderException(ResourceLimitError,MemoryAllocationFailed,image);
184+
185+ if (OpenBlob(image_info,image,ReadBinaryBlobMode,exception) == MagickFail)
186+ ThrowReaderException(FileOpenError,UnableToOpenFile,image);
187+
188+ in_len=GetBlobSize(image);
189+ in_buf=MagickAllocateResourceLimitedArray(unsigned char *,in_len,sizeof(*in_buf));
190+ if (in_buf == (unsigned char *) NULL)
191+ ThrowHEIFReaderException(ResourceLimitError,MemoryAllocationFailed,image);
192+
193+ if(ReadBlob(image,in_len,in_buf) != in_len)
194+ ThrowHEIFReaderException(CorruptImageError, UnexpectedEndOfFile, image);
195+
196+ /* Init HEIF-Decoder handles */
197+ heif=heif_context_alloc();
198+
199+ heif_status=heif_context_read_from_memory(heif, in_buf, in_len, NULL);
200+ if(heif_status.code == heif_error_Unsupported_filetype
201+ || heif_status.code == heif_error_Unsupported_feature)
202+ ThrowHEIFReaderException(CoderError, ImageTypeNotSupported, image);
203+ if(heif_status.code != heif_error_Ok)
204+ ThrowHEIFReaderException(CorruptImageError, AnErrorHasOccurredReadingFromFile, image);
205+
206+ /* no support for reading multiple images but could be added */
207+ if(heif_context_get_number_of_top_level_images(heif) != 1)
208+ ThrowHEIFReaderException(CoderError, NumberOfImagesIsNotSupported, image);
209+
210+ heif_status=heif_context_get_primary_image_handle(heif, &heif_image_handle);
211+ if(heif_status.code == heif_error_Memory_allocation_error)
212+ ThrowHEIFReaderException(ResourceLimitError,MemoryAllocationFailed,image);
213+ if(heif_status.code != heif_error_Ok)
214+ ThrowHEIFReaderException(CorruptImageError, AnErrorHasOccurredReadingFromFile, image);
215+
216+ image->columns=heif_image_handle_get_width(heif_image_handle);
217+ image->rows=heif_image_handle_get_height(heif_image_handle);
218+ if(heif_image_handle_has_alpha_channel(heif_image_handle))
219+ image->matte=MagickTrue;
220+
221+ if(!ReadMetadata(heif_image_handle, image, exception)) {
222+ HEIFReadCleanup()
223+ return NULL;
224+ }
225+
226+ heif_status=heif_decode_image(heif_image_handle, &heif_image,
227+ heif_colorspace_RGB, image->matte ? heif_chroma_interleaved_RGBA :
228+ heif_chroma_interleaved_RGB, NULL);
229+ if(heif_status.code == heif_error_Memory_allocation_error)
230+ ThrowHEIFReaderException(ResourceLimitError,MemoryAllocationFailed,image);
231+ if(heif_status.code != heif_error_Ok)
232+ ThrowHEIFReaderException(CorruptImageError, AnErrorHasOccurredReadingFromFile, image);
233+
234+ image->depth=heif_image_get_bits_per_pixel(heif_image, heif_channel_interleaved);
235+ // the requested channel is interleaved there depth is a sum of all channels
236+ // split it up again:
237+ if(image->depth == 32 && image->matte)
238+ image->depth = 8;
239+ else if(image->depth == 24 && !image->matte)
240+ image->depth = 8;
241+ else
242+ ThrowHEIFReaderException(CoderError, UnsupportedBitsPerSample, image);
243+
244+ pixels=heif_image_get_plane_readonly(heif_image, heif_channel_interleaved, &row_stride);
245+ if(!pixels)
246+ ThrowHEIFReaderException(CoderError, NoDataReturned, image);
247+
248+ for (y=0; y < (long)image->rows; y++)
249+ {
250+ q=SetImagePixelsEx(image,0,y,image->columns,1,exception);
251+ if (q == (PixelPacket *) NULL)
252+ ThrowHEIFReaderException(ResourceLimitError,MemoryAllocationFailed,image);
253+ for (x=0; x < (long)image->columns; x++)
254+ {
255+ SetRedSample(q,ScaleCharToQuantum(*pixels++));
256+ SetGreenSample(q,ScaleCharToQuantum(*pixels++));
257+ SetBlueSample(q,ScaleCharToQuantum(*pixels++));
258+ if(image->matte) {
259+ SetOpacitySample(q,MaxRGB-ScaleCharToQuantum(*pixels++));
260+ } else {
261+ SetOpacitySample(q,OpaqueOpacity);
262+ }
263+ q++;
264+ }
265+ if (!SyncImagePixels(image))
266+ ThrowHEIFReaderException(ResourceLimitError,MemoryAllocationFailed,image);
267+ }
268+
269+ HEIFReadCleanup()
270+ CloseBlob(image);
271+ return image;
272+}
273+
274+#endif
275+
276+/*
277+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
278+% %
279+% %
280+% %
281+% R e g i s t e r H E I F I m a g e %
282+% %
283+% %
284+% %
285+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
286+%
287+% Method RegisterHEIFImage adds attributes for the HEIF image format to
288+% the list of supported formats. The attributes include the image format
289+% tag, a method to read and/or write the format and a brief
290+% description of the format.
291+%
292+% The format of the RegisterHEIFImage method is:
293+%
294+% RegisterHEIFImage(void)
295+%
296+*/
297+ModuleExport void RegisterHEIFImage(void)
298+{
299+ static const char
300+ description[] = "HEIF Image Format";
301+
302+ static char
303+ version[20];
304+
305+ MagickInfo
306+ *entry;
307+
308+ unsigned int
309+ heif_major,
310+ heif_minor,
311+ heif_revision;
312+
313+ *version='\0';
314+
315+ int encoder_version=heif_get_version_number();
316+ heif_major=(encoder_version >> 16) & 0xff;
317+ heif_minor=(encoder_version >> 8) & 0xff;
318+ heif_revision=encoder_version & 0xff;
319+ (void) sprintf(version,
320+ "heif v%u.%u.%u", heif_major,
321+ heif_minor, heif_revision);
322+
323+ entry=SetMagickInfo("HEIF");
324+#if defined(HasHEIF)
325+ entry->decoder=(DecoderHandler) ReadHEIFImage;
326+#endif
327+ entry->description=description;
328+ entry->adjoin=False;
329+ entry->seekable_stream=MagickTrue;
330+ if (*version != '\0')
331+ entry->version=version;
332+ entry->module="HEIF";
333+ entry->coder_class=PrimaryCoderClass;
334+ (void) RegisterMagickInfo(entry);
335+
336+ entry=SetMagickInfo("HEIC");
337+#if defined(HasHEIF)
338+ entry->decoder=(DecoderHandler) ReadHEIFImage;
339+#endif
340+ entry->description=description;
341+ entry->adjoin=False;
342+ entry->seekable_stream=MagickTrue;
343+ if (*version != '\0')
344+ entry->version=version;
345+ entry->module="HEIF";
346+ entry->coder_class=PrimaryCoderClass;
347+ (void) RegisterMagickInfo(entry);
348+}
349+
350+/*
351+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
352+% %
353+% %
354+% %
355+% U n r e g i s t e r H E I F I m a g e %
356+% %
357+% %
358+% %
359+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
360+%
361+% Method UnregisterHEIFImage removes format registrations made by the
362+% HEIF module from the list of supported formats.
363+%
364+% The format of the UnregisterHEIFImage method is:
365+%
366+% UnregisterHEIFImage(void)
367+%
368+*/
369+ModuleExport void UnregisterHEIFImage(void)
370+{
371+ (void) UnregisterMagickInfo("HEIF");
372+ (void) UnregisterMagickInfo("HEIC");
373+}
diff -r 48c9416cca66 -r 9164b6c0f0a6 configure
--- a/configure Mon May 10 11:16:24 2021 -0500
+++ b/configure Mon Jul 12 11:16:33 2021 +0200
@@ -728,6 +728,9 @@
728728 XML_LIBS
729729 XML_CFLAGS
730730 xml2_config
731+LIB_HEIF
732+HasHEIF_FALSE
733+HasHEIF_TRUE
731734 LIB_WEBP
732735 HasWEBP_FALSE
733736 HasWEBP_TRUE
@@ -1061,6 +1064,7 @@
10611064 with_gs
10621065 with_jbig
10631066 with_webp
1067+with_heif
10641068 with_jpeg
10651069 with_jp2
10661070 with_lcms2
@@ -1786,6 +1790,7 @@
17861790 --without-gs disable Ghostscript support
17871791 --without-jbig disable JBIG support
17881792 --without-webp disable WEBP support
1793+ --without-heif disable HEIF support
17891794 --without-jpeg disable JPEG support
17901795 --without-jp2 disable JPEG v2 support
17911796 --without-lcms2 disable lcms (v2.X) support
@@ -7635,7 +7640,7 @@
76357640 We can't simply define LARGE_OFF_T to be 9223372036854775807,
76367641 since some C++ compilers masquerading as C compilers
76377642 incorrectly reject 9223372036854775807. */
7638-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7643+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
76397644 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
76407645 && LARGE_OFF_T % 2147483647 == 1)
76417646 ? 1 : -1];
@@ -7803,7 +7808,6 @@
78037808
78047809
78057810
7806-
78077811 ltmain=$ac_aux_dir/ltmain.sh
78087812
78097813 # Backslashify metacharacters that are still active within
@@ -19417,6 +19421,19 @@
1941719421 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-webp=$with_webp "
1941819422 fi
1941919423
19424+# Disable HEIF.
19425+
19426+# Check whether --with-heif was given.
19427+if test "${with_heif+set}" = set; then :
19428+ withval=$with_heif; with_heif=$withval
19429+else
19430+ with_heif='yes'
19431+fi
19432+
19433+if test "$with_heif" != 'yes' ; then
19434+ DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-heif=$with_heif "
19435+fi
19436+
1942019437 # Disable JPEG.
1942119438
1942219439 # Check whether --with-jpeg was given.
@@ -27182,6 +27199,103 @@
2718227199
2718327200
2718427201
27202+# Check for HEIF
27203+#
27204+have_heif='no'
27205+LIB_HEIF=''
27206+if test "$with_heif" != 'no'
27207+then
27208+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEIF support " >&5
27209+$as_echo_n "checking for HEIF support ... " >&6; }
27210+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
27211+$as_echo "" >&6; }
27212+ failed=0
27213+ passed=0
27214+ ac_fn_c_check_header_mongrel "$LINENO" "libheif/heif.h" "ac_cv_header_libheif_heif_h" "$ac_includes_default"
27215+if test "x$ac_cv_header_libheif_heif_h" = xyes; then :
27216+ passed=`expr $passed + 1`
27217+else
27218+ failed=`expr $failed + 1`
27219+fi
27220+
27221+
27222+ # heif always requires hwy no extra test needed
27223+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for heif_context_alloc in -lheif" >&5
27224+$as_echo_n "checking for heif_context_alloc in -lheif... " >&6; }
27225+if ${ac_cv_lib_heif_heif_context_alloc+:} false; then :
27226+ $as_echo_n "(cached) " >&6
27227+else
27228+ ac_check_lib_save_LIBS=$LIBS
27229+LIBS="-lheif $LIBS"
27230+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27231+/* end confdefs.h. */
27232+
27233+/* Override any GCC internal prototype to avoid an error.
27234+ Use char because int might match the return type of a GCC
27235+ builtin and then its argument prototype would still apply. */
27236+#ifdef __cplusplus
27237+extern "C"
27238+#endif
27239+char heif_context_alloc ();
27240+int
27241+main ()
27242+{
27243+return heif_context_alloc ();
27244+ ;
27245+ return 0;
27246+}
27247+_ACEOF
27248+if ac_fn_c_try_link "$LINENO"; then :
27249+ ac_cv_lib_heif_heif_context_alloc=yes
27250+else
27251+ ac_cv_lib_heif_heif_context_alloc=no
27252+fi
27253+rm -f core conftest.err conftest.$ac_objext \
27254+ conftest$ac_exeext conftest.$ac_ext
27255+LIBS=$ac_check_lib_save_LIBS
27256+fi
27257+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_heif_heif_context_alloc" >&5
27258+$as_echo "$ac_cv_lib_heif_heif_context_alloc" >&6; }
27259+if test "x$ac_cv_lib_heif_heif_context_alloc" = xyes; then :
27260+ passed=`expr $passed + 1`
27261+else
27262+ failed=`expr $failed + 1`
27263+fi
27264+
27265+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if HEIF package is complete" >&5
27266+$as_echo_n "checking if HEIF package is complete... " >&6; }
27267+ if test $passed -gt 0
27268+ then
27269+ if test $failed -gt 0
27270+ then
27271+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no -- some components failed test" >&5
27272+$as_echo "no -- some components failed test" >&6; }
27273+ have_heif='no (failed tests)'
27274+ else
27275+ LIB_HEIF='-lheif'
27276+ LIBS="$LIB_HEIF $LIBS"
27277+
27278+$as_echo "#define HasHEIF 1" >>confdefs.h
27279+
27280+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27281+$as_echo "yes" >&6; }
27282+ have_heif='yes'
27283+ fi
27284+ else
27285+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27286+$as_echo "no" >&6; }
27287+ fi
27288+fi
27289+ if test "$have_heif" = 'yes'; then
27290+ HasHEIF_TRUE=
27291+ HasHEIF_FALSE='#'
27292+else
27293+ HasHEIF_TRUE='#'
27294+ HasHEIF_FALSE=
27295+fi
27296+
27297+
27298+
2718527299 #
2718627300 # Check for XML
2718727301 #
@@ -29930,6 +30044,10 @@
2993030044 DELEGATES="$DELEGATES webp"
2993130045 MAGICK_FEATURES="$MAGICK_FEATURES WEBP"
2993230046 fi
30047+if test "$have_heif" = 'yes' ; then
30048+ DELEGATES="$DELEGATES heif"
30049+ MAGICK_FEATURES="$MAGICK_FEATURES HEIF"
30050+fi
2993330051 if test "$have_png$have_jpeg" = 'yesyes' ; then
2993430052 DELEGATES="$DELEGATES jng"
2993530053 MAGICK_FEATURES="$MAGICK_FEATURES JNG"
@@ -30051,7 +30169,7 @@
3005130169 then
3005230170 MAGICK_DEP_LIBS="$LIBS_USER $LIB_LCMS $LIB_TTF $LIB_GS $LIB_XEXT $LIB_IPC $LIB_X11 $LIB_BZLIB $LIB_ZLIB $LIB_LTDL $LIB_TRIO $LIB_GDI32 $LIB_MATH $LIB_THREAD $LIB_TCMALLOC $LIB_UMEM $LIB_MTMALLOC"
3005330171 else
30054- MAGICK_DEP_LIBS="$LIBS_USER $LIB_JBIG $LIB_WEBP $LIB_LCMS $LIB_TIFF $LIB_TTF $LIB_JP2 $LIB_JPEG $LIB_GS $LIB_PNG $LIB_FPX $LIB_WMF $LIB_DPS $LIB_XEXT $LIB_IPC $LIB_X11 $LIB_LZMA $LIB_BZLIB $LIB_XML $LIB_ZLIB $LIB_ZSTD $LIB_TRIO $LIB_GDI32 $LIB_MATH $LIB_THREAD $LIB_TCMALLOC $LIB_UMEM $LIB_MTMALLOC"
30172+ MAGICK_DEP_LIBS="$LIBS_USER $LIB_JBIG $LIB_WEBP $LIB_HEIF $LIB_LCMS $LIB_TIFF $LIB_TTF $LIB_JP2 $LIB_JPEG $LIB_GS $LIB_PNG $LIB_FPX $LIB_WMF $LIB_DPS $LIB_XEXT $LIB_IPC $LIB_X11 $LIB_LZMA $LIB_BZLIB $LIB_XML $LIB_ZLIB $LIB_ZSTD $LIB_TRIO $LIB_GDI32 $LIB_MATH $LIB_THREAD $LIB_TCMALLOC $LIB_UMEM $LIB_MTMALLOC"
3005530173 fi
3005630174 MAGICK_EXTRA_DEP_LIBS="$LIB_OMP" # Extra libraries typically added due to CFLAGS
3005730175
@@ -30422,6 +30540,10 @@
3042230540 as_fn_error $? "conditional \"HasWEBP\" was never defined.
3042330541 Usually this means the macro was only invoked conditionally." "$LINENO" 5
3042430542 fi
30543+if test -z "${HasHEIF_TRUE}" && test -z "${HasHEIF_FALSE}"; then
30544+ as_fn_error $? "conditional \"HasHEIF\" was never defined.
30545+Usually this means the macro was only invoked conditionally." "$LINENO" 5
30546+fi
3042530547 if test -z "${HasXML_TRUE}" && test -z "${HasXML_FALSE}"; then
3042630548 as_fn_error $? "conditional \"HasXML\" was never defined.
3042730549 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -32975,6 +33097,7 @@
3297533097 printf "TIFF --with-tiff=$with_tiff \t$have_tiff\n"
3297633098 printf "TRIO --with-trio=$with_trio \t$have_trio\n"
3297733099 printf "WEBP --with-webp=$with_webp \t$have_webp\n"
33100+printf "HEIF --with-heif=$with_heif \t$have_heif\n"
3297833101 result_windows_font_dir='none'
3297933102 if test "${windows_font_dir}x" != 'x'
3298033103 then
diff -r 48c9416cca66 -r 9164b6c0f0a6 configure.ac
--- a/configure.ac Mon May 10 11:16:24 2021 -0500
+++ b/configure.ac Mon Jul 12 11:16:33 2021 +0200
@@ -686,6 +686,16 @@
686686 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-webp=$with_webp "
687687 fi
688688
689+# Disable HEIF.
690+AC_ARG_WITH([heif],
691+ AS_HELP_STRING([--without-heif],
692+ [disable HEIF support]),
693+ [with_heif=$withval],
694+ [with_heif='yes'])
695+if test "$with_heif" != 'yes' ; then
696+ DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-heif=$with_heif "
697+fi
698+
689699 # Disable JPEG.
690700 AC_ARG_WITH([jpeg],
691701 AS_HELP_STRING([--without-jpeg],
@@ -2532,6 +2542,40 @@
25322542 AM_CONDITIONAL([HasWEBP],[test "$have_webp" = 'yes'])
25332543 AC_SUBST([LIB_WEBP])
25342544
2545+# Check for HEIF
2546+#
2547+have_heif='no'
2548+LIB_HEIF=''
2549+if test "$with_heif" != 'no'
2550+then
2551+ AC_MSG_CHECKING([for HEIF support ])
2552+ AC_MSG_RESULT()
2553+ failed=0
2554+ passed=0
2555+ AC_CHECK_HEADER([libheif/heif.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`])
2556+ # heif always requires hwy no extra test needed
2557+ AC_CHECK_LIB([heif],[heif_context_alloc],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`])
2558+ AC_MSG_CHECKING([if HEIF package is complete])
2559+ if test $passed -gt 0
2560+ then
2561+ if test $failed -gt 0
2562+ then
2563+ AC_MSG_RESULT([no -- some components failed test])
2564+ have_heif='no (failed tests)'
2565+ else
2566+ LIB_HEIF='-lheif'
2567+ LIBS="$LIB_HEIF $LIBS"
2568+ AC_DEFINE([HasHEIF],[1],[Define if you have HEIF library])
2569+ AC_MSG_RESULT([yes])
2570+ have_heif='yes'
2571+ fi
2572+ else
2573+ AC_MSG_RESULT([no])
2574+ fi
2575+fi
2576+AM_CONDITIONAL([HasHEIF],[test "$have_heif" = 'yes'])
2577+AC_SUBST([LIB_HEIF])
2578+
25352579 #
25362580 # Check for XML
25372581 #
@@ -3549,6 +3593,10 @@
35493593 DELEGATES="$DELEGATES webp"
35503594 MAGICK_FEATURES="$MAGICK_FEATURES WEBP"
35513595 fi
3596+if test "$have_heif" = 'yes' ; then
3597+ DELEGATES="$DELEGATES heif"
3598+ MAGICK_FEATURES="$MAGICK_FEATURES HEIF"
3599+fi
35523600 if test "$have_png$have_jpeg" = 'yesyes' ; then
35533601 DELEGATES="$DELEGATES jng"
35543602 MAGICK_FEATURES="$MAGICK_FEATURES JNG"
@@ -3674,7 +3722,7 @@
36743722 then
36753723 MAGICK_DEP_LIBS="$LIBS_USER $LIB_LCMS $LIB_TTF $LIB_GS $LIB_XEXT $LIB_IPC $LIB_X11 $LIB_BZLIB $LIB_ZLIB $LIB_LTDL $LIB_TRIO $LIB_GDI32 $LIB_MATH $LIB_THREAD $LIB_TCMALLOC $LIB_UMEM $LIB_MTMALLOC"
36763724 else
3677- MAGICK_DEP_LIBS="$LIBS_USER $LIB_JBIG $LIB_WEBP $LIB_LCMS $LIB_TIFF $LIB_TTF $LIB_JP2 $LIB_JPEG $LIB_GS $LIB_PNG $LIB_FPX $LIB_WMF $LIB_DPS $LIB_XEXT $LIB_IPC $LIB_X11 $LIB_LZMA $LIB_BZLIB $LIB_XML $LIB_ZLIB $LIB_ZSTD $LIB_TRIO $LIB_GDI32 $LIB_MATH $LIB_THREAD $LIB_TCMALLOC $LIB_UMEM $LIB_MTMALLOC"
3725+ MAGICK_DEP_LIBS="$LIBS_USER $LIB_JBIG $LIB_WEBP $LIB_HEIF $LIB_LCMS $LIB_TIFF $LIB_TTF $LIB_JP2 $LIB_JPEG $LIB_GS $LIB_PNG $LIB_FPX $LIB_WMF $LIB_DPS $LIB_XEXT $LIB_IPC $LIB_X11 $LIB_LZMA $LIB_BZLIB $LIB_XML $LIB_ZLIB $LIB_ZSTD $LIB_TRIO $LIB_GDI32 $LIB_MATH $LIB_THREAD $LIB_TCMALLOC $LIB_UMEM $LIB_MTMALLOC"
36783726 fi
36793727 MAGICK_EXTRA_DEP_LIBS="$LIB_OMP" # Extra libraries typically added due to CFLAGS
36803728 AC_SUBST([MAGICK_DEP_LIBS])
@@ -3818,6 +3866,7 @@
38183866 printf "TIFF --with-tiff=$with_tiff \t$have_tiff\n"
38193867 printf "TRIO --with-trio=$with_trio \t$have_trio\n"
38203868 printf "WEBP --with-webp=$with_webp \t$have_webp\n"
3869+printf "HEIF --with-heif=$with_heif \t$have_heif\n"
38213870 result_windows_font_dir='none'
38223871 if test "${windows_font_dir}x" != 'x'
38233872 then
diff -r 48c9416cca66 -r 9164b6c0f0a6 magick/magick_config.h.in
--- a/magick/magick_config.h.in Mon May 10 11:16:24 2021 -0500
+++ b/magick/magick_config.h.in Mon Jul 12 11:16:33 2021 +0200
@@ -471,6 +471,9 @@
471471 /* Define if you have WEBP library */
472472 #undef HasWEBP
473473
474+/* Define if you have HEIF library */
475+#undef HasHEIF
476+
474477 /* Define to use the Windows GDI32 library */
475478 #undef HasWINGDI32
476479
diff -r 48c9416cca66 -r 9164b6c0f0a6 magick/module_aliases.h
--- a/magick/module_aliases.h Mon May 10 11:16:24 2021 -0500
+++ b/magick/module_aliases.h Mon Jul 12 11:16:33 2021 +0200
@@ -74,6 +74,7 @@
7474 MODULEALIAS("H","LOGO"),
7575 MODULEALIAS("HTM","HTML"),
7676 MODULEALIAS("HTTP","URL"),
77+ MODULEALIAS("HEIC","HEIF"),
7778 MODULEALIAS("ICB","TGA"),
7879 MODULEALIAS("ICC","META"),
7980 MODULEALIAS("ICM","META"),
diff -r 48c9416cca66 -r 9164b6c0f0a6 magick/static.c
--- a/magick/static.c Mon May 10 11:16:24 2021 -0500
+++ b/magick/static.c Mon Jul 12 11:16:33 2021 +0200
@@ -96,6 +96,9 @@
9696 STATICM("HISTOGRAM",RegisterHISTOGRAMImage,UnregisterHISTOGRAMImage),
9797 STATICM("HRZ",RegisterHRZImage,UnregisterHRZImage),
9898 STATICM("HTML",RegisterHTMLImage,UnregisterHTMLImage),
99+#if defined(HasHEIF)
100+ STATICM("HEIF",RegisterHEIFImage,UnregisterHEIFImage),
101+#endif
99102 STATICM("ICON",RegisterICONImage,UnregisterICONImage),
100103 STATICM("IDENTITY",RegisterIDENTITYImage,UnregisterIDENTITYImage),
101104 STATICM("INFO",RegisterINFOImage,UnregisterINFOImage),
diff -r 48c9416cca66 -r 9164b6c0f0a6 magick/static.h
--- a/magick/static.h Mon May 10 11:16:24 2021 -0500
+++ b/magick/static.h Mon Jul 12 11:16:33 2021 +0200
@@ -149,6 +149,7 @@
149149 RegisterVSTImage(void),
150150 RegisterWBMPImage(void),
151151 RegisterWEBPImage(void),
152+ RegisterHEIFImage(void),
152153 RegisterWMFImage(void),
153154 RegisterWPGImage(void),
154155 RegisterXImage(void),
@@ -294,6 +295,7 @@
294295 UnregisterVSTImage(void),
295296 UnregisterWBMPImage(void),
296297 UnregisterWEBPImage(void),
298+ UnregisterHEIFImage(void),
297299 UnregisterWMFImage(void),
298300 UnregisterWPGImage(void),
299301 UnregisterXImage(void),
diff -r 48c9416cca66 -r 9164b6c0f0a6 magick/symbols.h
--- a/magick/symbols.h Mon May 10 11:16:24 2021 -0500
+++ b/magick/symbols.h Mon Jul 12 11:16:33 2021 +0200
@@ -811,6 +811,7 @@
811811 #define RegisterGIFImage GmRegisterGIFImage
812812 #define RegisterGRADIENTImage GmRegisterGRADIENTImage
813813 #define RegisterGRAYImage GmRegisterGRAYImage
814+#define RegisterHEIFImage GmRegisterHEIFImage
814815 #define RegisterHISTOGRAMImage GmRegisterHISTOGRAMImage
815816 #define RegisterHRZImage GmRegisterHRZImage
816817 #define RegisterHTMLImage GmRegisterHTMLImage
@@ -1034,6 +1035,7 @@
10341035 #define UnregisterGIFImage GmUnregisterGIFImage
10351036 #define UnregisterGRADIENTImage GmUnregisterGRADIENTImage
10361037 #define UnregisterGRAYImage GmUnregisterGRAYImage
1038+#define UnregisterHEIFImage GmUnregisterHEIFImage
10371039 #define UnregisterHISTOGRAMImage GmUnregisterHISTOGRAMImage
10381040 #define UnregisterHRZImage GmUnregisterHRZImage
10391041 #define UnregisterHTMLImage GmUnregisterHTMLImage
Show on old repository browser