Commit 093f1b790 for imagemagick.org
commit 093f1b790217824e6ff535462852bd5c755bce4c
Author: Cristy <urban-warrior@imagemagick.org>
Date: Sat Mar 21 10:08:37 2026 -0400
https://github.com/ImageMagick/ImageMagick/discussions/6914
diff --git a/Makefile.in b/Makefile.in
index 5f446a067..0d290e06b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -3451,6 +3451,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_CXX = @PTHREAD_CXX@
PTHREAD_LIBS = @PTHREAD_LIBS@
+PreviewDelegate = @PreviewDelegate@
PrintDelegate = @PrintDelegate@
QUANTUM_DEPTH = @QUANTUM_DEPTH@
RANLIB = @RANLIB@
diff --git a/coders/miff.c b/coders/miff.c
index 190f5dbc4..f5bcc4a71 100644
--- a/coders/miff.c
+++ b/coders/miff.c
@@ -612,7 +612,7 @@ static Image *ReadMIFFImage(const ImageInfo *image_info,
c=ReadBlobByte(image);
if (c == (int) '{')
{
- *p++=c;
+ *p++=(char) c;
c=ReadBlobByte(image);
}
while ((c != (int) '{') && (c != (int) '}') && (c != EOF))
diff --git a/coders/mpc.c b/coders/mpc.c
index 729e040fd..52af74714 100644
--- a/coders/mpc.c
+++ b/coders/mpc.c
@@ -307,7 +307,7 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
c=ReadBlobByte(image);
if (c == (int) '{')
{
- *p++=c;
+ *p++=(char) c;
c=ReadBlobByte(image);
}
while ((c != (int) '{') && (c != (int) '}') && (c != EOF))
diff --git a/config/delegates.xml.in b/config/delegates.xml.in
index d69ff6c04..3761f1ab7 100644
--- a/config/delegates.xml.in
+++ b/config/delegates.xml.in
@@ -83,6 +83,7 @@
<delegate decode="jpg" encode="lep" mode="encode" command="@SHELL_QUOTE@@LEPDelegate@@SHELL_QUOTE@ @SHELL_QUOTE@%i@SHELL_QUOTE@ @SHELL_QUOTE@%o@SHELL_QUOTE@"/>
<delegate decode="jxr" command="@MVDelegate@ @SHELL_QUOTE@%i@SHELL_QUOTE@ @SHELL_QUOTE@%i.jxr@SHELL_QUOTE@; @SHELL_QUOTE@@JXRDecodeDelegate@@SHELL_QUOTE@ -i @SHELL_QUOTE@%i.jxr@SHELL_QUOTE@ -o @SHELL_QUOTE@%o.tiff@SHELL_QUOTE@; @MVDelegate@ @SHELL_QUOTE@%i.jxr@SHELL_QUOTE@ @SHELL_QUOTE@%i@SHELL_QUOTE@; @MVDelegate@ @SHELL_QUOTE@%o.tiff@SHELL_QUOTE@ @SHELL_QUOTE@%o@SHELL_QUOTE@"/>
<delegate decode="lep" mode="decode" command="@SHELL_QUOTE@@LEPDelegate@@SHELL_QUOTE@ @SHELL_QUOTE@%i@SHELL_QUOTE@ @SHELL_QUOTE@%o@SHELL_QUOTE@"/>
+ <delegate decode="png" encode="preview" spawn="True" command="@SHELL_QUOTE@@PreviewDelegate@@SHELL_QUOTE@ -a Preview @SHELL_QUOTE@%i@SHELL_QUOTE@"/>
<delegate decode="miff" encode="show" spawn="True" command="@SHELL_QUOTE@@DisplayDelegate@@SHELL_QUOTE@ display -immutable -delay 0 -title @SHELL_QUOTE@%M@SHELL_QUOTE@ @SHELL_QUOTE@%i@SHELL_QUOTE@"/>
<delegate decode="miff" encode="win" stealth="True" spawn="True" command="@SHELL_QUOTE@@DisplayDelegate@@SHELL_QUOTE@ display -immutable -delay 0 -title @SHELL_QUOTE@%M@SHELL_QUOTE@ @SHELL_QUOTE@%i@SHELL_QUOTE@"/>
<delegate decode="odg" command="@SHELL_QUOTE@@DOCDecodeDelegate@@SHELL_QUOTE@ --convert-to pdf --outdir `dirname @SHELL_QUOTE@%i@SHELL_QUOTE@` @SHELL_QUOTE@%i@SHELL_QUOTE@ 2> @SHELL_QUOTE@%u@SHELL_QUOTE@; @MVDelegate@ @SHELL_QUOTE@%i.pdf@SHELL_QUOTE@ @SHELL_QUOTE@%o@SHELL_QUOTE@"/>
diff --git a/configure b/configure
index 3f622a6b8..791bf368e 100755
--- a/configure
+++ b/configure
@@ -723,6 +723,7 @@ SVGDecodeDelegate
RSVGDecodeDelegate
RMDelegate
PSDelegate
+PreviewDelegate
PCLDelegate
MVDelegate
MrSIDDecodeDelegate
@@ -5388,7 +5389,7 @@ MAGICK_PATCHLEVEL_VERSION=18
MAGICK_VERSION=7.1.2-18
-MAGICK_GIT_REVISION=3f2f62940:20260315
+MAGICK_GIT_REVISION=5c4cca722:20260321
# Substitute library versioning
@@ -5422,7 +5423,7 @@ PACKAGE_LIB_VERSION=0x712
PACKAGE_LIB_VERSION_NUMBER=7,1,2,18
-PACKAGE_RELEASE_DATE=2026-03-15
+PACKAGE_RELEASE_DATE=2026-03-21
# Ensure that make can run correctly
@@ -37392,6 +37393,7 @@ MKDIRDelegateDefault='mkdir'
MrSIDDecodeDelegateDefault='mrsidgeodecode'
MVDelegateDefault='mv'
PCLDelegateDefault='pcl6'
+PreviewDelegateDefault='open'
if test "$native_win32_build" = 'yes'; then
PSDelegateDefault='gswin32c'
elif test "$gslib_framework" = 'yes'; then
@@ -38785,6 +38787,53 @@ printf "%s\n" "no" >&6; }
fi
+# Extract the first word of ""$PreviewDelegateDefault"", so it can be a program name with args.
+set dummy "$PreviewDelegateDefault"; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PreviewDelegate+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) case $PreviewDelegate in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PreviewDelegate="$PreviewDelegate" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PreviewDelegate="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_PreviewDelegate" && ac_cv_path_PreviewDelegate=""$PreviewDelegateDefault""
+ ;;
+esac ;;
+esac
+fi
+PreviewDelegate=$ac_cv_path_PreviewDelegate
+if test -n "$PreviewDelegate"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PreviewDelegate" >&5
+printf "%s\n" "$PreviewDelegate" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
for ac_prog in gsx gsc "$PSDelegateDefault"
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -39666,6 +39715,7 @@ if test "$with_frozenpaths" != 'yes'; then
MogrifyDelegate="$MogrifyDelegateDefault"
MrSIDDecodeDelegate="$MrSIDDecodeDelegateDefault"
PCLDelegate="$PCLDelegateDefault"
+ PreviewDelegate="$PreviewDelegateDefault"
PSDelegate="$PSDelegateDefault"
RSVGDecodeDelegate="$RSVGDecodeDelegateDefault"
SVGDecodeDelegate="$SVGDecodeDelegateDefault"
@@ -39713,6 +39763,7 @@ fi
+
#
diff --git a/configure.ac b/configure.ac
index 45e4ff2c5..77fe782e8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3324,6 +3324,7 @@ MKDIRDelegateDefault='mkdir'
MrSIDDecodeDelegateDefault='mrsidgeodecode'
MVDelegateDefault='mv'
PCLDelegateDefault='pcl6'
+PreviewDelegateDefault='open'
if test "$native_win32_build" = 'yes'; then
PSDelegateDefault='gswin32c'
elif test "$gslib_framework" = 'yes'; then
@@ -3373,6 +3374,7 @@ AC_PATH_PROG([MKDIRDelegate],["$MKDIRDelegateDefault"],["$MKDIRDelegateDefault"]
AC_PATH_PROG([MrSIDDecodeDelegate],["$MrSIDDecodeDelegateDefault"],["$MrSIDDecodeDelegateDefault"])
AC_PATH_PROG([MVDelegate],["$MVDelegateDefault"],["$MVDelegateDefault"])
AC_PATH_PROG([PCLDelegate],["$PCLDelegateDefault"],["$PCLDelegateDefault"])
+AC_PATH_PROG([PreviewDelegate],["$PreviewDelegateDefault"],["$PreviewDelegateDefault"])
AC_PATH_PROGS([PSDelegate],[gsx gsc "$PSDelegateDefault"],["$PSDelegateDefault"])
AC_PATH_PROG([RMDelegate],["$RMDelegateDefault"],["$RMDelegateDefault"])
AC_PATH_PROG([RSVGDecodeDelegate],["$RSVGDecodeDelegateDefault"],["$RSVGDecodeDelegateDefault"])
@@ -3670,6 +3672,7 @@ if test "$with_frozenpaths" != 'yes'; then
MogrifyDelegate="$MogrifyDelegateDefault"
MrSIDDecodeDelegate="$MrSIDDecodeDelegateDefault"
PCLDelegate="$PCLDelegateDefault"
+ PreviewDelegate="$PreviewDelegateDefault"
PSDelegate="$PSDelegateDefault"
RSVGDecodeDelegate="$RSVGDecodeDelegateDefault"
SVGDecodeDelegate="$SVGDecodeDelegateDefault"
@@ -3710,6 +3713,7 @@ AC_SUBST([VIDEOEncodeDelegate])
AC_SUBST([MogrifyDelegate])
AC_SUBST([MrSIDDecodeDelegate])
AC_SUBST([PCLDelegate])
+AC_SUBST([PreviewDelegate])
AC_SUBST([PSDelegate])
AC_SUBST([ShowImageDelegate])
AC_SUBST([TextEncodeDelegate])