]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 31 Mar 2013 21:15:31 +0000 (21:15 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 31 Mar 2013 21:15:31 +0000 (21:15 +0000)
MagickCore/channel.c
MagickCore/version.h
Makefile.in
coders/Makefile.am
coders/mask.c [new file with mode: 0644]
configure

index cbd280e27fd0c8e4402846e5559cb18c3e94e792..a6ef95d7d88ad489c277137b215372601e213992 100644 (file)
@@ -621,7 +621,7 @@ MagickExport Image *SeparateImage(const Image *image,
     y;
 
   /*
-    Initialize spread image attributes.
+    Initialize separate image attributes.
   */
   assert(image != (Image *) NULL);
   assert(image->signature == MagickSignature);
index 1d8a7b28d598445d2adff031fad46084c1f49439..efe89b02c4df963c51b31b049ab25c97c559c1a1 100644 (file)
@@ -27,14 +27,14 @@ extern "C" {
 */
 #define MagickPackageName "ImageMagick"
 #define MagickCopyright  "Copyright (C) 1999-2013 ImageMagick Studio LLC"
-#define MagickSVNRevision  "11453:11522"
+#define MagickSVNRevision  "11606:11622M"
 #define MagickLibVersion  0x700
 #define MagickLibVersionText  "7.0.0"
 #define MagickLibVersionNumber  1,0,0
 #define MagickLibAddendum  "-0"
 #define MagickLibInterface  1
 #define MagickLibMinInterface  1
-#define MagickReleaseDate  "2013-03-29"
+#define MagickReleaseDate  "2013-03-31"
 #define MagickChangeDate   "20121005"
 #define MagickAuthoritativeURL  "http://www.imagemagick.org"
 #define MagickFeatures "DPC HDRI OpenMP"
index 23d9187c6a95bdd59661d4a9044920fce23ba9fa..946729d420ea0f3a14cc8f3c216bdbea14f4a76e 100644 (file)
@@ -521,27 +521,28 @@ am__MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_SOURC
        coders/gray.c coders/hald.c coders/hdr.c coders/histogram.c \
        coders/hrz.c coders/html.c coders/jnx.c coders/icon.c \
        coders/info.c coders/inline.c coders/ipl.c coders/label.c \
-       coders/mac.c coders/magick.c coders/map.c coders/mat.c \
-       coders/matte.c coders/meta.c coders/miff.c coders/mono.c \
-       coders/mpc.c coders/mpeg.c coders/mpr.c coders/msl.c \
-       coders/mtv.c coders/mvg.c coders/null.c coders/otb.c \
-       coders/palm.c coders/pango.c coders/pattern.c coders/pcd.c \
-       coders/pcl.c coders/pcx.c coders/pdb.c coders/pdf.c \
-       coders/pes.c coders/pict.c coders/pix.c coders/plasma.c \
-       coders/pnm.c coders/preview.c coders/ps.c coders/ps2.c \
-       coders/ps3.c coders/psd.c coders/pwp.c coders/raw.c \
-       coders/rgb.c coders/rla.c coders/rle.c coders/scr.c \
-       coders/sct.c coders/sfw.c coders/sgi.c coders/stegano.c \
-       coders/sun.c coders/svg.c coders/tga.c coders/thumbnail.c \
-       coders/tile.c coders/tim.c coders/ttf.c coders/txt.c \
-       coders/uil.c coders/url.c coders/uyvy.c coders/vicar.c \
-       coders/vid.c coders/viff.c coders/wbmp.c coders/wpg.c \
-       coders/xbm.c coders/xc.c coders/xcf.c coders/xpm.c \
-       coders/xps.c coders/ycbcr.c coders/yuv.c coders/dps.c \
-       coders/djvu.c coders/exr.c coders/fpx.c coders/clipboard.c \
-       coders/emf.c coders/jbig.c coders/jpeg.c coders/jp2.c \
-       coders/png.c coders/ept.c coders/tiff.c coders/webp.c \
-       coders/wmf.c coders/x.c coders/xwd.c filters/analyze.c
+       coders/mac.c coders/magick.c coders/map.c coders/mask.c \
+       coders/mat.c coders/matte.c coders/meta.c coders/miff.c \
+       coders/mono.c coders/mpc.c coders/mpeg.c coders/mpr.c \
+       coders/msl.c coders/mtv.c coders/mvg.c coders/null.c \
+       coders/otb.c coders/palm.c coders/pango.c coders/pattern.c \
+       coders/pcd.c coders/pcl.c coders/pcx.c coders/pdb.c \
+       coders/pdf.c coders/pes.c coders/pict.c coders/pix.c \
+       coders/plasma.c coders/pnm.c coders/preview.c coders/ps.c \
+       coders/ps2.c coders/ps3.c coders/psd.c coders/pwp.c \
+       coders/raw.c coders/rgb.c coders/rla.c coders/rle.c \
+       coders/scr.c coders/sct.c coders/sfw.c coders/sgi.c \
+       coders/stegano.c coders/sun.c coders/svg.c coders/tga.c \
+       coders/thumbnail.c coders/tile.c coders/tim.c coders/ttf.c \
+       coders/txt.c coders/uil.c coders/url.c coders/uyvy.c \
+       coders/vicar.c coders/vid.c coders/viff.c coders/wbmp.c \
+       coders/wpg.c coders/xbm.c coders/xc.c coders/xcf.c \
+       coders/xpm.c coders/xps.c coders/ycbcr.c coders/yuv.c \
+       coders/dps.c coders/djvu.c coders/exr.c coders/fpx.c \
+       coders/clipboard.c coders/emf.c coders/jbig.c coders/jpeg.c \
+       coders/jp2.c coders/png.c coders/ept.c coders/tiff.c \
+       coders/webp.c coders/wmf.c coders/x.c coders/xwd.c \
+       filters/analyze.c
 am__objects_1 = MagickCore/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-accelerate.lo \
        MagickCore/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-animate.lo \
        MagickCore/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-annotate.lo \
@@ -691,6 +692,7 @@ am__objects_16 = coders/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_
        coders/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-mac.lo \
        coders/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-magick.lo \
        coders/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-map.lo \
+       coders/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-mask.lo \
        coders/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-mat.lo \
        coders/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-matte.lo \
        coders/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-meta.lo \
@@ -1201,6 +1203,14 @@ coders_map_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
        $(coders_map_la_LDFLAGS) $(LDFLAGS) -o $@
 @WITH_MODULES_TRUE@am_coders_map_la_rpath = -rpath $(codersdir)
+coders_mask_la_DEPENDENCIES = $(MAGICKCORE_LIBS)
+am_coders_mask_la_OBJECTS = coders/coders_mask_la-mask.lo
+coders_mask_la_OBJECTS = $(am_coders_mask_la_OBJECTS)
+coders_mask_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+       $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+       $(AM_CFLAGS) $(CFLAGS) $(coders_mask_la_LDFLAGS) $(LDFLAGS) -o \
+       $@
+@WITH_MODULES_TRUE@am_coders_mask_la_rpath = -rpath $(codersdir)
 coders_mat_la_DEPENDENCIES = $(MAGICKCORE_LIBS) $(am__DEPENDENCIES_1) \
        $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
 am_coders_mat_la_OBJECTS = coders/coders_mat_la-mat.lo
@@ -2050,42 +2060,43 @@ SOURCES = $(Magick___lib_libMagick___@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_
        $(coders_jp2_la_SOURCES) $(coders_jpeg_la_SOURCES) \
        $(coders_label_la_SOURCES) $(coders_mac_la_SOURCES) \
        $(coders_magick_la_SOURCES) $(coders_map_la_SOURCES) \
-       $(coders_mat_la_SOURCES) $(coders_matte_la_SOURCES) \
-       $(coders_meta_la_SOURCES) $(coders_miff_la_SOURCES) \
-       $(coders_mono_la_SOURCES) $(coders_mpc_la_SOURCES) \
-       $(coders_mpeg_la_SOURCES) $(coders_mpr_la_SOURCES) \
-       $(coders_msl_la_SOURCES) $(coders_mtv_la_SOURCES) \
-       $(coders_mvg_la_SOURCES) $(coders_null_la_SOURCES) \
-       $(coders_otb_la_SOURCES) $(coders_palm_la_SOURCES) \
-       $(coders_pango_la_SOURCES) $(coders_pattern_la_SOURCES) \
-       $(coders_pcd_la_SOURCES) $(coders_pcl_la_SOURCES) \
-       $(coders_pcx_la_SOURCES) $(coders_pdb_la_SOURCES) \
-       $(coders_pdf_la_SOURCES) $(coders_pes_la_SOURCES) \
-       $(coders_pict_la_SOURCES) $(coders_pix_la_SOURCES) \
-       $(coders_plasma_la_SOURCES) $(coders_png_la_SOURCES) \
-       $(coders_pnm_la_SOURCES) $(coders_preview_la_SOURCES) \
-       $(coders_ps_la_SOURCES) $(coders_ps2_la_SOURCES) \
-       $(coders_ps3_la_SOURCES) $(coders_psd_la_SOURCES) \
-       $(coders_pwp_la_SOURCES) $(coders_raw_la_SOURCES) \
-       $(coders_rgb_la_SOURCES) $(coders_rla_la_SOURCES) \
-       $(coders_rle_la_SOURCES) $(coders_scr_la_SOURCES) \
-       $(coders_sct_la_SOURCES) $(coders_sfw_la_SOURCES) \
-       $(coders_sgi_la_SOURCES) $(coders_stegano_la_SOURCES) \
-       $(coders_sun_la_SOURCES) $(coders_svg_la_SOURCES) \
-       $(coders_tga_la_SOURCES) $(coders_thumbnail_la_SOURCES) \
-       $(coders_tiff_la_SOURCES) $(coders_tile_la_SOURCES) \
-       $(coders_tim_la_SOURCES) $(coders_ttf_la_SOURCES) \
-       $(coders_txt_la_SOURCES) $(coders_uil_la_SOURCES) \
-       $(coders_url_la_SOURCES) $(coders_uyvy_la_SOURCES) \
-       $(coders_vicar_la_SOURCES) $(coders_vid_la_SOURCES) \
-       $(coders_viff_la_SOURCES) $(coders_wbmp_la_SOURCES) \
-       $(coders_webp_la_SOURCES) $(coders_wmf_la_SOURCES) \
-       $(coders_wpg_la_SOURCES) $(coders_x_la_SOURCES) \
-       $(coders_xbm_la_SOURCES) $(coders_xc_la_SOURCES) \
-       $(coders_xcf_la_SOURCES) $(coders_xpm_la_SOURCES) \
-       $(coders_xps_la_SOURCES) $(coders_xwd_la_SOURCES) \
-       $(coders_ycbcr_la_SOURCES) $(coders_yuv_la_SOURCES) \
-       $(filters_analyze_la_SOURCES) $(Magick___demo_analyze_SOURCES) \
+       $(coders_mask_la_SOURCES) $(coders_mat_la_SOURCES) \
+       $(coders_matte_la_SOURCES) $(coders_meta_la_SOURCES) \
+       $(coders_miff_la_SOURCES) $(coders_mono_la_SOURCES) \
+       $(coders_mpc_la_SOURCES) $(coders_mpeg_la_SOURCES) \
+       $(coders_mpr_la_SOURCES) $(coders_msl_la_SOURCES) \
+       $(coders_mtv_la_SOURCES) $(coders_mvg_la_SOURCES) \
+       $(coders_null_la_SOURCES) $(coders_otb_la_SOURCES) \
+       $(coders_palm_la_SOURCES) $(coders_pango_la_SOURCES) \
+       $(coders_pattern_la_SOURCES) $(coders_pcd_la_SOURCES) \
+       $(coders_pcl_la_SOURCES) $(coders_pcx_la_SOURCES) \
+       $(coders_pdb_la_SOURCES) $(coders_pdf_la_SOURCES) \
+       $(coders_pes_la_SOURCES) $(coders_pict_la_SOURCES) \
+       $(coders_pix_la_SOURCES) $(coders_plasma_la_SOURCES) \
+       $(coders_png_la_SOURCES) $(coders_pnm_la_SOURCES) \
+       $(coders_preview_la_SOURCES) $(coders_ps_la_SOURCES) \
+       $(coders_ps2_la_SOURCES) $(coders_ps3_la_SOURCES) \
+       $(coders_psd_la_SOURCES) $(coders_pwp_la_SOURCES) \
+       $(coders_raw_la_SOURCES) $(coders_rgb_la_SOURCES) \
+       $(coders_rla_la_SOURCES) $(coders_rle_la_SOURCES) \
+       $(coders_scr_la_SOURCES) $(coders_sct_la_SOURCES) \
+       $(coders_sfw_la_SOURCES) $(coders_sgi_la_SOURCES) \
+       $(coders_stegano_la_SOURCES) $(coders_sun_la_SOURCES) \
+       $(coders_svg_la_SOURCES) $(coders_tga_la_SOURCES) \
+       $(coders_thumbnail_la_SOURCES) $(coders_tiff_la_SOURCES) \
+       $(coders_tile_la_SOURCES) $(coders_tim_la_SOURCES) \
+       $(coders_ttf_la_SOURCES) $(coders_txt_la_SOURCES) \
+       $(coders_uil_la_SOURCES) $(coders_url_la_SOURCES) \
+       $(coders_uyvy_la_SOURCES) $(coders_vicar_la_SOURCES) \
+       $(coders_vid_la_SOURCES) $(coders_viff_la_SOURCES) \
+       $(coders_wbmp_la_SOURCES) $(coders_webp_la_SOURCES) \
+       $(coders_wmf_la_SOURCES) $(coders_wpg_la_SOURCES) \
+       $(coders_x_la_SOURCES) $(coders_xbm_la_SOURCES) \
+       $(coders_xc_la_SOURCES) $(coders_xcf_la_SOURCES) \
+       $(coders_xpm_la_SOURCES) $(coders_xps_la_SOURCES) \
+       $(coders_xwd_la_SOURCES) $(coders_ycbcr_la_SOURCES) \
+       $(coders_yuv_la_SOURCES) $(filters_analyze_la_SOURCES) \
+       $(Magick___demo_analyze_SOURCES) \
        $(Magick___demo_button_SOURCES) $(Magick___demo_demo_SOURCES) \
        $(Magick___demo_detrans_SOURCES) $(Magick___demo_flip_SOURCES) \
        $(Magick___demo_gravity_SOURCES) \
@@ -2138,42 +2149,43 @@ DIST_SOURCES = $(Magick___lib_libMagick___@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUF
        $(coders_jp2_la_SOURCES) $(coders_jpeg_la_SOURCES) \
        $(coders_label_la_SOURCES) $(coders_mac_la_SOURCES) \
        $(coders_magick_la_SOURCES) $(coders_map_la_SOURCES) \
-       $(coders_mat_la_SOURCES) $(coders_matte_la_SOURCES) \
-       $(coders_meta_la_SOURCES) $(coders_miff_la_SOURCES) \
-       $(coders_mono_la_SOURCES) $(coders_mpc_la_SOURCES) \
-       $(coders_mpeg_la_SOURCES) $(coders_mpr_la_SOURCES) \
-       $(coders_msl_la_SOURCES) $(coders_mtv_la_SOURCES) \
-       $(coders_mvg_la_SOURCES) $(coders_null_la_SOURCES) \
-       $(coders_otb_la_SOURCES) $(coders_palm_la_SOURCES) \
-       $(coders_pango_la_SOURCES) $(coders_pattern_la_SOURCES) \
-       $(coders_pcd_la_SOURCES) $(coders_pcl_la_SOURCES) \
-       $(coders_pcx_la_SOURCES) $(coders_pdb_la_SOURCES) \
-       $(coders_pdf_la_SOURCES) $(coders_pes_la_SOURCES) \
-       $(coders_pict_la_SOURCES) $(coders_pix_la_SOURCES) \
-       $(coders_plasma_la_SOURCES) $(coders_png_la_SOURCES) \
-       $(coders_pnm_la_SOURCES) $(coders_preview_la_SOURCES) \
-       $(coders_ps_la_SOURCES) $(coders_ps2_la_SOURCES) \
-       $(coders_ps3_la_SOURCES) $(coders_psd_la_SOURCES) \
-       $(coders_pwp_la_SOURCES) $(coders_raw_la_SOURCES) \
-       $(coders_rgb_la_SOURCES) $(coders_rla_la_SOURCES) \
-       $(coders_rle_la_SOURCES) $(coders_scr_la_SOURCES) \
-       $(coders_sct_la_SOURCES) $(coders_sfw_la_SOURCES) \
-       $(coders_sgi_la_SOURCES) $(coders_stegano_la_SOURCES) \
-       $(coders_sun_la_SOURCES) $(coders_svg_la_SOURCES) \
-       $(coders_tga_la_SOURCES) $(coders_thumbnail_la_SOURCES) \
-       $(coders_tiff_la_SOURCES) $(coders_tile_la_SOURCES) \
-       $(coders_tim_la_SOURCES) $(coders_ttf_la_SOURCES) \
-       $(coders_txt_la_SOURCES) $(coders_uil_la_SOURCES) \
-       $(coders_url_la_SOURCES) $(coders_uyvy_la_SOURCES) \
-       $(coders_vicar_la_SOURCES) $(coders_vid_la_SOURCES) \
-       $(coders_viff_la_SOURCES) $(coders_wbmp_la_SOURCES) \
-       $(coders_webp_la_SOURCES) $(coders_wmf_la_SOURCES) \
-       $(coders_wpg_la_SOURCES) $(coders_x_la_SOURCES) \
-       $(coders_xbm_la_SOURCES) $(coders_xc_la_SOURCES) \
-       $(coders_xcf_la_SOURCES) $(coders_xpm_la_SOURCES) \
-       $(coders_xps_la_SOURCES) $(coders_xwd_la_SOURCES) \
-       $(coders_ycbcr_la_SOURCES) $(coders_yuv_la_SOURCES) \
-       $(filters_analyze_la_SOURCES) $(Magick___demo_analyze_SOURCES) \
+       $(coders_mask_la_SOURCES) $(coders_mat_la_SOURCES) \
+       $(coders_matte_la_SOURCES) $(coders_meta_la_SOURCES) \
+       $(coders_miff_la_SOURCES) $(coders_mono_la_SOURCES) \
+       $(coders_mpc_la_SOURCES) $(coders_mpeg_la_SOURCES) \
+       $(coders_mpr_la_SOURCES) $(coders_msl_la_SOURCES) \
+       $(coders_mtv_la_SOURCES) $(coders_mvg_la_SOURCES) \
+       $(coders_null_la_SOURCES) $(coders_otb_la_SOURCES) \
+       $(coders_palm_la_SOURCES) $(coders_pango_la_SOURCES) \
+       $(coders_pattern_la_SOURCES) $(coders_pcd_la_SOURCES) \
+       $(coders_pcl_la_SOURCES) $(coders_pcx_la_SOURCES) \
+       $(coders_pdb_la_SOURCES) $(coders_pdf_la_SOURCES) \
+       $(coders_pes_la_SOURCES) $(coders_pict_la_SOURCES) \
+       $(coders_pix_la_SOURCES) $(coders_plasma_la_SOURCES) \
+       $(coders_png_la_SOURCES) $(coders_pnm_la_SOURCES) \
+       $(coders_preview_la_SOURCES) $(coders_ps_la_SOURCES) \
+       $(coders_ps2_la_SOURCES) $(coders_ps3_la_SOURCES) \
+       $(coders_psd_la_SOURCES) $(coders_pwp_la_SOURCES) \
+       $(coders_raw_la_SOURCES) $(coders_rgb_la_SOURCES) \
+       $(coders_rla_la_SOURCES) $(coders_rle_la_SOURCES) \
+       $(coders_scr_la_SOURCES) $(coders_sct_la_SOURCES) \
+       $(coders_sfw_la_SOURCES) $(coders_sgi_la_SOURCES) \
+       $(coders_stegano_la_SOURCES) $(coders_sun_la_SOURCES) \
+       $(coders_svg_la_SOURCES) $(coders_tga_la_SOURCES) \
+       $(coders_thumbnail_la_SOURCES) $(coders_tiff_la_SOURCES) \
+       $(coders_tile_la_SOURCES) $(coders_tim_la_SOURCES) \
+       $(coders_ttf_la_SOURCES) $(coders_txt_la_SOURCES) \
+       $(coders_uil_la_SOURCES) $(coders_url_la_SOURCES) \
+       $(coders_uyvy_la_SOURCES) $(coders_vicar_la_SOURCES) \
+       $(coders_vid_la_SOURCES) $(coders_viff_la_SOURCES) \
+       $(coders_wbmp_la_SOURCES) $(coders_webp_la_SOURCES) \
+       $(coders_wmf_la_SOURCES) $(coders_wpg_la_SOURCES) \
+       $(coders_x_la_SOURCES) $(coders_xbm_la_SOURCES) \
+       $(coders_xc_la_SOURCES) $(coders_xcf_la_SOURCES) \
+       $(coders_xpm_la_SOURCES) $(coders_xps_la_SOURCES) \
+       $(coders_xwd_la_SOURCES) $(coders_ycbcr_la_SOURCES) \
+       $(coders_yuv_la_SOURCES) $(filters_analyze_la_SOURCES) \
+       $(Magick___demo_analyze_SOURCES) \
        $(Magick___demo_button_SOURCES) $(Magick___demo_demo_SOURCES) \
        $(Magick___demo_detrans_SOURCES) $(Magick___demo_flip_SOURCES) \
        $(Magick___demo_gravity_SOURCES) \
@@ -3096,6 +3108,7 @@ MAGICKCORE_CODER_SRCS = \
        coders/mac.c \
        coders/magick.c \
        coders/map.c \
+       coders/mask.c \
        coders/mat.c \
        coders/matte.c \
        coders/meta.c \
@@ -3216,6 +3229,7 @@ MAGICKCORE_CODER_SRCS = \
 @WITH_MODULES_TRUE@    coders/mac.la \
 @WITH_MODULES_TRUE@    coders/magick.la \
 @WITH_MODULES_TRUE@    coders/map.la \
+@WITH_MODULES_TRUE@    coders/mask.la \
 @WITH_MODULES_TRUE@    coders/mat.la \
 @WITH_MODULES_TRUE@    coders/matte.la \
 @WITH_MODULES_TRUE@    coders/meta.la \
@@ -3595,6 +3609,12 @@ coders_map_la_CPPFLAGS = $(MODULE_EXTRA_CPPFLAGS)
 coders_map_la_LDFLAGS = $(MODULECOMMONFLAGS)
 coders_map_la_LIBADD = $(MAGICKCORE_LIBS)
 
+# MASK coder module
+coders_mask_la_SOURCES = coders/mask.c
+coders_mask_la_CPPFLAGS = $(MODULE_EXTRA_CPPFLAGS)
+coders_mask_la_LDFLAGS = $(MODULECOMMONFLAGS)
+coders_mask_la_LIBADD = $(MAGICKCORE_LIBS)
+
 # MAT coder module
 coders_mat_la_SOURCES = coders/mat.c
 coders_mat_la_CPPFLAGS = $(MODULE_EXTRA_CPPFLAGS)
@@ -5680,6 +5700,8 @@ coders/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-ma
        coders/$(am__dirstamp) coders/$(DEPDIR)/$(am__dirstamp)
 coders/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-map.lo:  \
        coders/$(am__dirstamp) coders/$(DEPDIR)/$(am__dirstamp)
+coders/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-mask.lo:  \
+       coders/$(am__dirstamp) coders/$(DEPDIR)/$(am__dirstamp)
 coders/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-mat.lo:  \
        coders/$(am__dirstamp) coders/$(DEPDIR)/$(am__dirstamp)
 coders/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-matte.lo:  \
@@ -6130,6 +6152,10 @@ coders/coders_map_la-map.lo: coders/$(am__dirstamp) \
        coders/$(DEPDIR)/$(am__dirstamp)
 coders/map.la: $(coders_map_la_OBJECTS) $(coders_map_la_DEPENDENCIES) $(EXTRA_coders_map_la_DEPENDENCIES) coders/$(am__dirstamp)
        $(AM_V_CCLD)$(coders_map_la_LINK) $(am_coders_map_la_rpath) $(coders_map_la_OBJECTS) $(coders_map_la_LIBADD) $(LIBS)
+coders/coders_mask_la-mask.lo: coders/$(am__dirstamp) \
+       coders/$(DEPDIR)/$(am__dirstamp)
+coders/mask.la: $(coders_mask_la_OBJECTS) $(coders_mask_la_DEPENDENCIES) $(EXTRA_coders_mask_la_DEPENDENCIES) coders/$(am__dirstamp)
+       $(AM_V_CCLD)$(coders_mask_la_LINK) $(am_coders_mask_la_rpath) $(coders_mask_la_OBJECTS) $(coders_mask_la_LIBADD) $(LIBS)
 coders/coders_mat_la-mat.lo: coders/$(am__dirstamp) \
        coders/$(DEPDIR)/$(am__dirstamp)
 coders/mat.la: $(coders_mat_la_OBJECTS) $(coders_mat_la_DEPENDENCIES) $(EXTRA_coders_mat_la_DEPENDENCIES) coders/$(am__dirstamp)
@@ -6936,6 +6962,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-mac.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-magick.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-map.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-mask.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-mat.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-matte.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-meta.Plo@am__quote@
@@ -7056,6 +7083,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/coders_mac_la-mac.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/coders_magick_la-magick.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/coders_map_la-map.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/coders_mask_la-mask.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/coders_mat_la-mat.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/coders_matte_la-matte.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/coders_meta_la-meta.Plo@am__quote@
@@ -8091,6 +8119,13 @@ coders/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-ma
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o coders/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-map.lo `test -f 'coders/map.c' || echo '$(srcdir)/'`coders/map.c
 
+coders/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-mask.lo: coders/mask.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT coders/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-mask.lo -MD -MP -MF coders/$(DEPDIR)/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-mask.Tpo -c -o coders/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-mask.lo `test -f 'coders/mask.c' || echo '$(srcdir)/'`coders/mask.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) coders/$(DEPDIR)/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-mask.Tpo coders/$(DEPDIR)/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-mask.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='coders/mask.c' object='coders/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-mask.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o coders/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-mask.lo `test -f 'coders/mask.c' || echo '$(srcdir)/'`coders/mask.c
+
 coders/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-mat.lo: coders/mat.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT coders/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-mat.lo -MD -MP -MF coders/$(DEPDIR)/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-mat.Tpo -c -o coders/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-mat.lo `test -f 'coders/mat.c' || echo '$(srcdir)/'`coders/mat.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) coders/$(DEPDIR)/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-mat.Tpo coders/$(DEPDIR)/MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la-mat.Plo
@@ -9176,6 +9211,13 @@ coders/coders_map_la-map.lo: coders/map.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @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_map_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o coders/coders_map_la-map.lo `test -f 'coders/map.c' || echo '$(srcdir)/'`coders/map.c
 
+coders/coders_mask_la-mask.lo: coders/mask.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(coders_mask_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT coders/coders_mask_la-mask.lo -MD -MP -MF coders/$(DEPDIR)/coders_mask_la-mask.Tpo -c -o coders/coders_mask_la-mask.lo `test -f 'coders/mask.c' || echo '$(srcdir)/'`coders/mask.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) coders/$(DEPDIR)/coders_mask_la-mask.Tpo coders/$(DEPDIR)/coders_mask_la-mask.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='coders/mask.c' object='coders/coders_mask_la-mask.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@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_mask_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o coders/coders_mask_la-mask.lo `test -f 'coders/mask.c' || echo '$(srcdir)/'`coders/mask.c
+
 coders/coders_mat_la-mat.lo: coders/mat.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(coders_mat_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT coders/coders_mat_la-mat.lo -MD -MP -MF coders/$(DEPDIR)/coders_mat_la-mat.Tpo -c -o coders/coders_mat_la-mat.lo `test -f 'coders/mat.c' || echo '$(srcdir)/'`coders/mat.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) coders/$(DEPDIR)/coders_mat_la-mat.Tpo coders/$(DEPDIR)/coders_mat_la-mat.Plo
index def0bf2e47fc5dd7e9d4d662dc676792dfb18d83..3af1cc2a3f69c625076b67748b0d02ffb123cf7e 100644 (file)
@@ -123,6 +123,7 @@ MAGICKCORE_CODER_SRCS = \
        coders/mac.c \
        coders/magick.c \
        coders/map.c \
+       coders/mask.c \
        coders/mat.c \
        coders/matte.c \
        coders/meta.c \
@@ -243,6 +244,7 @@ coders_LTLIBRARIES = \
        coders/mac.la \
        coders/magick.la \
        coders/map.la \
+       coders/mask.la \
        coders/mat.la \
        coders/matte.la \
        coders/meta.la \
@@ -624,6 +626,12 @@ coders_map_la_CPPFLAGS     = $(MODULE_EXTRA_CPPFLAGS)
 coders_map_la_LDFLAGS      = $(MODULECOMMONFLAGS)
 coders_map_la_LIBADD       = $(MAGICKCORE_LIBS)
 
+# MASK coder module
+coders_mask_la_SOURCES    = coders/mask.c
+coders_mask_la_CPPFLAGS   = $(MODULE_EXTRA_CPPFLAGS)
+coders_mask_la_LDFLAGS    = $(MODULECOMMONFLAGS)
+coders_mask_la_LIBADD     = $(MAGICKCORE_LIBS)
+
 # MAT coder module
 coders_mat_la_SOURCES      = coders/mat.c
 coders_mat_la_CPPFLAGS     = $(MODULE_EXTRA_CPPFLAGS)
diff --git a/coders/mask.c b/coders/mask.c
new file mode 100644 (file)
index 0000000..6fcb2e3
--- /dev/null
@@ -0,0 +1,312 @@
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%                         M   M   AAA   SSSSS  K   K                          %
+%                         MM MM  A   A  SS     K  K                           %
+%                         M M M  AAAAA   SSS   KKK                            %
+%                         M   M  A   A     SS  K  K                           %
+%                         M   M  A   A  SSSSS  K   K                          %
+%                                                                             %
+%                                                                             %
+%                              Write Mask File.                               %
+%                                                                             %
+%                              Software Design                                %
+%                                John Cristy                                  %
+%                                 July 1992                                   %
+%                                                                             %
+%                                                                             %
+%  Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization      %
+%  dedicated to making software imaging solutions freely available.           %
+%                                                                             %
+%  You may not use this file except in compliance with the License.  You may  %
+%  obtain a copy of the License at                                            %
+%                                                                             %
+%    http://www.imagemagick.org/script/license.php                            %
+%                                                                             %
+%  Unless required by applicable law or agreed to in writing, software        %
+%  distributed under the License is distributed on an "AS IS" BASIS,          %
+%  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   %
+%  See the License for the specific language governing permissions and        %
+%  limitations under the License.                                             %
+%                                                                             %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%
+*/
+\f
+/*
+  Include declarations.
+*/
+#include "MagickCore/studio.h"
+#include "MagickCore/attribute.h"
+#include "MagickCore/blob.h"
+#include "MagickCore/blob-private.h"
+#include "MagickCore/constitute.h"
+#include "MagickCore/enhance.h"
+#include "MagickCore/exception.h"
+#include "MagickCore/exception-private.h"
+#include "MagickCore/list.h"
+#include "MagickCore/magick.h"
+#include "MagickCore/memory_.h"
+#include "MagickCore/monitor.h"
+#include "MagickCore/monitor-private.h"
+#include "MagickCore/pixel-accessor.h"
+#include "MagickCore/quantum-private.h"
+#include "MagickCore/static.h"
+#include "MagickCore/string_.h"
+#include "MagickCore/module.h"
+\f
+/*
+  Forward declarations.
+*/
+static MagickBooleanType
+  WriteMASKImage(const ImageInfo *,Image *,ExceptionInfo *);
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%   R e a d M A S K I m a g e                                                 %
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%  ReadMASKImage returns the image mask associated with the image.
+%
+%  The format of the ReadMASKImage method is:
+%
+%      Image *ReadMASKImage(const ImageInfo *image_info,
+%        ExceptionInfo *exception)
+%
+%  A description of each parameter follows:
+%
+%    o image_info: the image info.
+%
+%    o exception: return any errors or warnings in this structure.
+%
+*/
+static Image *ReadMASKImage(const ImageInfo *image_info,
+  ExceptionInfo *exception)
+{
+  Image
+    *image;
+
+  ImageInfo
+    *read_info;
+
+  /*
+    Initialize Image structure.
+  */
+  assert(image_info != (const ImageInfo *) NULL);
+  assert(image_info->signature == MagickSignature);
+  if (image_info->debug != MagickFalse)
+    (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
+      image_info->filename);
+  assert(exception != (ExceptionInfo *) NULL);
+  assert(exception->signature == MagickSignature);
+  read_info=CloneImageInfo(image_info);
+  SetImageInfoBlob(read_info,(void *) NULL,0);
+  *read_info->magick='\0';
+  image=ReadImage(read_info,exception);
+  read_info=DestroyImageInfo(read_info);
+  if (image != (Image *) NULL)
+    {
+      MagickBooleanType
+        status;
+
+      status=GrayscaleImage(image,image->intensity,exception);
+      if (status == MagickFalse)
+        image=DestroyImage(image);
+    }
+  return(GetFirstImageInList(image));
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%   R e g i s t e r M A S K I m a g e                                         %
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%  RegisterMASKImage() adds attributes for the MASK image format to
+%  the list of supported formats.  The attributes include the image format
+%  tag, a method to read and/or write the format, whether the format
+%  supports the saving of more than one frame to the same file or blob,
+%  whether the format supports native in-memory I/O, and a brief
+%  description of the format.
+%
+%  The format of the RegisterMASKImage method is:
+%
+%      size_t RegisterMASKImage(void)
+%
+*/
+ModuleExport size_t RegisterMASKImage(void)
+{
+  MagickInfo
+    *entry;
+
+  entry=SetMagickInfo("MASK");
+  entry->decoder=(DecodeImageHandler *) ReadMASKImage;
+  entry->encoder=(EncodeImageHandler *) WriteMASKImage;
+  entry->description=ConstantString("Image Clip Mask");
+  entry->module=ConstantString("MASK");
+  (void) RegisterMagickInfo(entry);
+  return(MagickImageCoderSignature);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%   U n r e g i s t e r M A S K I m a g e                                     %
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%  UnregisterMASKImage() removes format registrations made by the
+%  MASK module from the list of supported formats.
+%
+%  The format of the UnregisterMASKImage method is:
+%
+%      UnregisterMASKImage(void)
+%
+*/
+ModuleExport void UnregisterMASKImage(void)
+{
+  (void) UnregisterMagickInfo("MASK");
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%   W r i t e M A S K I m a g e                                               %
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%  WriteMASKImage() writes an image mask to a file.
+%
+%  The format of the WriteMASKImage method is:
+%
+%      MagickBooleanType WriteMASKImage(const ImageInfo *image_info,
+%        Image *image,ExceptionInfo *exception)
+%
+%  A description of each parameter follows.
+%
+%    o image_info: the image info.
+%
+%    o image:  The image.
+%
+%    o exception: return any errors or warnings in this structure.
+%
+*/
+
+static Image *MaskImage(const Image *image,ExceptionInfo *exception)
+{
+  CacheView
+    *image_view,
+    *mask_view;
+
+  Image
+    *mask_image;
+
+  MagickBooleanType
+    status;
+
+  ssize_t
+    y;
+
+  mask_image=CloneImage(image,image->columns,image->rows,MagickTrue,
+    exception);
+  if (mask_image == (Image *) NULL)
+    return((Image *) NULL);
+  if (SetImageStorageClass(mask_image,DirectClass,exception) == MagickFalse)
+    {
+      mask_image=DestroyImage(mask_image);
+      return((Image *) NULL);
+    }
+  mask_image->alpha_trait=UndefinedPixelTrait;
+  (void) SetImageColorspace(mask_image,GRAYColorspace,exception);
+  /*
+    Mask image.
+  */
+  status=MagickTrue;
+  image_view=AcquireVirtualCacheView(image,exception);
+  mask_view=AcquireAuthenticCacheView(mask_image,exception);
+  for (y=0; y < (ssize_t) image->rows; y++)
+  {
+    register const Quantum
+      *restrict p;
+
+    register Quantum
+      *restrict q;
+
+    register ssize_t
+      x;
+
+    if (status == MagickFalse)
+      continue;
+    p=GetCacheViewVirtualPixels(image_view,0,y,image->columns,1,exception);
+    q=QueueCacheViewAuthenticPixels(mask_view,0,y,mask_image->columns,1,
+      exception);
+    if ((p == (const Quantum *) NULL) || (q == (Quantum *) NULL))
+      {
+        status=MagickFalse;
+        continue;
+      }
+    for (x=0; x < (ssize_t) image->columns; x++)
+    {
+      SetPixelChannel(mask_image,GrayPixelChannel,0,q);
+      SetPixelChannel(mask_image,GrayPixelChannel,GetPixelMask(image,p),q);
+      p+=GetPixelChannels(image);
+      q+=GetPixelChannels(mask_image);
+    }
+    if (SyncCacheViewAuthenticPixels(mask_view,exception) == MagickFalse)
+      status=MagickFalse;
+  }
+  mask_view=DestroyCacheView(mask_view);
+  image_view=DestroyCacheView(image_view);
+  if (status == MagickFalse)
+    mask_image=DestroyImage(mask_image);
+  return(mask_image);
+}
+
+static MagickBooleanType WriteMASKImage(const ImageInfo *image_info,
+  Image *image,ExceptionInfo *exception)
+{
+  Image
+    *mask_image;
+
+  ImageInfo
+    *write_info;
+
+  MagickBooleanType
+    status;
+
+  mask_image=MaskImage(image,exception);
+  if (mask_image == (Image *) NULL)
+    return(MagickFalse);
+  (void) CopyMagickString(mask_image->filename,image->filename,MaxTextExtent);
+  write_info=CloneImageInfo(image_info);
+  (void) SetImageInfo(write_info,1,exception);
+  if (LocaleCompare(write_info->magick,"MASK") == 0)
+    (void) FormatLocaleString(mask_image->filename,MaxTextExtent,"miff:%s",
+      write_info->filename);
+  status=WriteImage(write_info,mask_image,exception);
+  mask_image=DestroyImage(mask_image);
+  write_info=DestroyImageInfo(write_info);
+  return(status);
+}
index cf0df22b642cead4fed8d7ab9b4218d17b4c156a..cb253d7ada26edc32351d3a0932e68284e22f6d5 100755 (executable)
--- a/configure
+++ b/configure
@@ -3675,7 +3675,7 @@ MAGICK_PATCHLEVEL_VERSION=0
 
 MAGICK_VERSION=7.0.0-0
 
-MAGICK_SVN_REVISION=11453:11522
+MAGICK_SVN_REVISION=11606:11622M
 
 
 # Substitute library versioning