GraphicsMagick: 2 new changesets
GraphicsMagick Commits <[email protected]> Sun, 15 Sep 2024 17:03:57 -0500
| Newsgroups | gmane.comp.video.graphicsmagick.cvs |
|---|---|
| Message-ID | <mailman.20928.1726437852.1470.graphicsmagick-commit@lists.sourceforge.net> |
changeset 2b034183f3a1 in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=2b034183f3a1 summary: config/type-urw-base35-t1.mgk.in: Add a template file for the newer Artifex urw-base35-fonts, but for the Postscript Type 1 fonts. changeset 23b8c0b311ac in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=23b8c0b311ac summary: TclMagick/generic/TclMagick.c: Fix several typos and quiet fallthrough warnings. diffstat: ChangeLog | 12 + TclMagick/generic/TclMagick.c | 69 ++++- TclMagick/generic/libttkcommon.c | 10 +- VisualMagick/installer/inc/version.isx | 4 +- config/type-urw-base35-otf.mgk.in | 8 +- config/type-urw-base35-t1.mgk.in | 410 +++++++++++++++++++++++++++++++++ magick/version.h | 4 +- www/ChangeLog.html | 9 + 8 files changed, 508 insertions(+), 18 deletions(-) diffs (truncated from 784 to 500 lines): diff -r c01449a5a8df -r 23b8c0b311ac ChangeLog --- a/ChangeLog Fri Sep 13 14:40:28 2024 -0500 +++ b/ChangeLog Sun Sep 15 17:01:29 2024 -0500 @@ -1,3 +1,15 @@ +2024-09-15 Bob Friesenhahn <[email protected]> + + * TclMagick/generic/TclMagick.c: Fix several typos which will + produce wrong results, as well as quieting fallthrough warnings. + +2024-09-14 Bob Friesenhahn <[email protected]> + + * config/type-urw-base35-t1.mgk.in: Add a template file for the + newer Artifex urw-base35-fonts, but for the Postscript Type 1 + fonts. This is not integrated into the build and no substitutions + are performed on it. + 2024-09-13 Bob Friesenhahn <[email protected]> * config/type-urw-base35-otf.mgk.in: Changes for the newer Artifex diff -r c01449a5a8df -r 23b8c0b311ac TclMagick/generic/TclMagick.c --- a/TclMagick/generic/TclMagick.c Fri Sep 13 14:40:28 2024 -0500 +++ b/TclMagick/generic/TclMagick.c Sun Sep 15 17:01:29 2024 -0500 @@ -599,7 +599,7 @@ Tcl_SetObjResult(interp, Tcl_NewStringObj(str, -1)); break; case 5: /* -version */ - MagickGetVersion(&version); + (void) MagickGetVersion(&version); sprintf( buf, "%ld.%ld.%ld", version >> 8, (version >> 4) & 0x0F, version & 0x0F); Tcl_SetObjResult(interp, Tcl_NewStringObj(buf, -1)); break; @@ -974,7 +974,7 @@ "peaksignaltonoiseratio", "rootmeansquarederror", (char *) NULL }; - static ChannelType metricTypes[] = { + static MetricType metricTypes[] = { MeanAbsoluteErrorMetric, MeanSquaredErrorMetric, PeakAbsoluteErrorMetric, PeakSignalToNoiseRatioMetric, RootMeanSquaredErrorMetric }; @@ -2585,7 +2585,7 @@ if (Tcl_GetIndexFromObj(interp, objv[2], opNames, "opType", 0, &opIdx) != TCL_OK) { return TCL_ERROR; } - result = MagickSetImageColorspace(wandPtr, opTypes[opIdx]); + result = MagickSetImageCompose(wandPtr, /* CompositeOperator */ opTypes[opIdx]); if (!result) { return myMagickError(interp, wandPtr); } @@ -2593,7 +2593,7 @@ /* * Get compose operator */ - op = MagickGetImageColorspace(wandPtr); + op = MagickGetImageCompose(wandPtr); for (opIdx = 0; (size_t) opIdx < sizeof(opTypes)/sizeof(opTypes[0]); opIdx++) { if( opTypes[opIdx] == op ) { Tcl_SetResult(interp, (char *)opNames[opIdx], TCL_VOLATILE); @@ -4160,7 +4160,7 @@ "frame", "unframe", "concatenate", (char *) NULL }; - static CompositeOperator modeTypes[] = { + static MontageMode modeTypes[] = { FrameMode, UnframeMode, ConcatenateMode }; char *name, *newName=NULL; @@ -5543,6 +5543,7 @@ case 5: quantVal = PixelGetOpacityQuantum(wandPtr); break; case 6: quantVal = PixelGetRedQuantum(wandPtr); break; case 7: quantVal = PixelGetYellowQuantum(wandPtr); break; + default: { quantVal = 0; } /* FIXME: Should be error report */ } Tcl_ListObjAppendElement(interp, listPtr, Tcl_NewIntObj(quantVal)); } else { @@ -5555,6 +5556,7 @@ case 5: normVal = PixelGetOpacity(wandPtr); break; case 6: normVal = PixelGetRed(wandPtr); break; case 7: normVal = PixelGetYellow(wandPtr); break; + default: { normVal = 0; }; /* FIXME: Should be error report */ } Tcl_ListObjAppendElement(interp, listPtr, Tcl_NewDoubleObj(normVal)); } @@ -5604,6 +5606,9 @@ case TM_SET_BLACK_QUANTUM: { quantFlag = 1; /* and continue ... */ +#if defined(MAGICK_FALLTHROUGH) + MAGICK_FALLTHROUGH; +#endif /* if defined(MAGICK_FALLTHROUGH) */ } case TM_SET_BLACK: { @@ -5628,6 +5633,9 @@ case TM_SET_BLUE_QUANTUM: { quantFlag = 1; /* and continue ... */ +#if defined(MAGICK_FALLTHROUGH) + MAGICK_FALLTHROUGH; +#endif /* if defined(MAGICK_FALLTHROUGH) */ } case TM_SET_BLUE: { @@ -5652,6 +5660,9 @@ case TM_SET_CYAN_QUANTUM: { quantFlag = 1; /* and continue ... */ +#if defined(MAGICK_FALLTHROUGH) + MAGICK_FALLTHROUGH; +#endif /* if defined(MAGICK_FALLTHROUGH) */ } case TM_SET_CYAN: { @@ -5676,6 +5687,9 @@ case TM_SET_GREEN_QUANTUM: { quantFlag = 1; /* and continue ... */ +#if defined(MAGICK_FALLTHROUGH) + MAGICK_FALLTHROUGH; +#endif /* if defined(MAGICK_FALLTHROUGH) */ } case TM_SET_GREEN: { @@ -5700,6 +5714,9 @@ case TM_SET_MAGENTA_QUANTUM: { quantFlag = 1; /* and continue ... */ +#if defined(MAGICK_FALLTHROUGH) + MAGICK_FALLTHROUGH; +#endif /* if defined(MAGICK_FALLTHROUGH) */ } case TM_SET_MAGENTA: { @@ -5724,6 +5741,9 @@ case TM_SET_OPACITY_QUANTUM: { quantFlag = 1; /* and continue ... */ +#if defined(MAGICK_FALLTHROUGH) + MAGICK_FALLTHROUGH; +#endif /* if defined(MAGICK_FALLTHROUGH) */ } case TM_SET_OPACITY: { @@ -5748,6 +5768,9 @@ case TM_SET_RED_QUANTUM: { quantFlag = 1; /* and continue ... */ +#if defined(MAGICK_FALLTHROUGH) + MAGICK_FALLTHROUGH; +#endif /* if defined(MAGICK_FALLTHROUGH) */ } case TM_SET_RED: { @@ -5772,6 +5795,9 @@ case TM_SET_YELLOW_QUANTUM: { quantFlag = 1; /* and continue ... */ +#if defined(MAGICK_FALLTHROUGH) + MAGICK_FALLTHROUGH; +#endif /* if defined(MAGICK_FALLTHROUGH) */ } case TM_SET_YELLOW: { @@ -5796,6 +5822,9 @@ case TM_GET_BLACK_QUANTUM: { quantFlag = 1; /* and continue ... */ +#if defined(MAGICK_FALLTHROUGH) + MAGICK_FALLTHROUGH; +#endif /* if defined(MAGICK_FALLTHROUGH) */ } case TM_GET_BLACK: { @@ -5816,6 +5845,9 @@ case TM_GET_BLUE_QUANTUM: { quantFlag = 1; /* and continue ... */ +#if defined(MAGICK_FALLTHROUGH) + MAGICK_FALLTHROUGH; +#endif /* if defined(MAGICK_FALLTHROUGH) */ } case TM_GET_BLUE: { @@ -5836,6 +5868,9 @@ case TM_GET_CYAN_QUANTUM: { quantFlag = 1; /* and continue ... */ +#if defined(MAGICK_FALLTHROUGH) + MAGICK_FALLTHROUGH; +#endif /* if defined(MAGICK_FALLTHROUGH) */ } case TM_GET_CYAN: { @@ -5856,6 +5891,9 @@ case TM_GET_GREEN_QUANTUM: { quantFlag = 1; /* and continue ... */ +#if defined(MAGICK_FALLTHROUGH) + MAGICK_FALLTHROUGH; +#endif /* if defined(MAGICK_FALLTHROUGH) */ } case TM_GET_GREEN: { @@ -5876,6 +5914,9 @@ case TM_GET_MAGENTA_QUANTUM: { quantFlag = 1; /* and continue ... */ +#if defined(MAGICK_FALLTHROUGH) + MAGICK_FALLTHROUGH; +#endif /* if defined(MAGICK_FALLTHROUGH) */ } case TM_GET_MAGENTA: { @@ -5896,6 +5937,9 @@ case TM_GET_OPACITY_QUANTUM: { quantFlag = 1; /* and continue ... */ +#if defined(MAGICK_FALLTHROUGH) + MAGICK_FALLTHROUGH; +#endif /* if defined(MAGICK_FALLTHROUGH) */ } case TM_GET_OPACITY: { @@ -5916,6 +5960,9 @@ case TM_GET_RED_QUANTUM: { quantFlag = 1; /* and continue ... */ +#if defined(MAGICK_FALLTHROUGH) + MAGICK_FALLTHROUGH; +#endif /* if defined(MAGICK_FALLTHROUGH) */ } case TM_GET_RED: { @@ -5936,6 +5983,9 @@ case TM_GET_YELLOW_QUANTUM: { quantFlag = 1; /* and continue ... */ +#if defined(MAGICK_FALLTHROUGH) + MAGICK_FALLTHROUGH; +#endif /* if defined(MAGICK_FALLTHROUGH) */ } case TM_GET_YELLOW: { @@ -7084,7 +7134,9 @@ return TCL_ERROR; } /* - FIXME: DrawRender() is deprecated. Use MagickDrawImage() instead. + FIXME: DrawRender() is deprecated. Use MagickDrawImage(wand,drawing_wand) instead. + unsigned int DrawRender(const DrawingWand *drawing_wand); + unsigned int MagickDrawImage(MagickWand *wand, const DrawingWand *drawing_wand); Note that TM_DRAW or TM_DRAW_IMAGE already draw on the image. so "render" is not needed. */ DrawRender(wandPtr); @@ -7364,9 +7416,9 @@ if (Tcl_GetIndexFromObj(interp, objv[2], joinNames, "linejoinType", 0, &joinIdx) != TCL_OK) { return TCL_ERROR; } - DrawSetStrokeLineCap(wandPtr, joinTypes[joinIdx]); + DrawSetStrokeLineJoin(wandPtr, joinTypes[joinIdx]); } else { /* Get font style */ - join = DrawGetStrokeLineCap(wandPtr); + join = DrawGetStrokeLineJoin(wandPtr); for (joinIdx = 0; (size_t) joinIdx < sizeof(joinTypes)/sizeof(joinTypes[0]); joinIdx++) { if( joinTypes[joinIdx] == join ) { Tcl_SetResult(interp, (char *)joinNames[joinIdx], TCL_VOLATILE); @@ -7725,6 +7777,7 @@ return TCL_ERROR; } DrawPushDefs(wandPtr); + break; } case TM_PUSH_CMD_GRAPH: /* graphiccontext */ { diff -r c01449a5a8df -r 23b8c0b311ac TclMagick/generic/libttkcommon.c --- a/TclMagick/generic/libttkcommon.c Fri Sep 13 14:40:28 2024 -0500 +++ b/TclMagick/generic/libttkcommon.c Sun Sep 15 17:01:29 2024 -0500 @@ -59,6 +59,9 @@ /*---------------------------------------------------------------------- * Return Magick error description as a TCL result * Used by both TclMagick and TkMagick. + * Modern Functions used in code are Tcl_SetObjResult(), Tcl_SetResult(,,TCL_VOLATILE) + * Tcl_AppendResult(), Tcl_AppendElement() + * Old Functions used in code are Tcl_AppendElement(), *---------------------------------------------------------------------- */ int myMagickError(Tcl_Interp *interp, MagickWand *wandPtr ) @@ -70,15 +73,16 @@ description = MagickGetException(wandPtr, &severity); if( (description == NULL) || (strlen(description) == 0) ) { - Tcl_AppendResult(interp, MagickGetPackageName(), ": Unknown error", NULL); + Tcl_AppendResult(interp, MagickGetPackageName(), ": Unknown error", (char *) NULL); } else { /* snprintf(msg, sizeof(msg), "%s: #%d:", MagickGetPackageName(), severity); */ /* FIXME, not used! */ - Tcl_AppendResult(interp, description, NULL); + Tcl_AppendResult(interp, description, (char *) NULL); } if( description != NULL ) { MagickRelinquishMemory(description); } - MagickClearException(wandPtr); + if (wandPtr != (MagickWand *) NULL) + MagickClearException(wandPtr); /* * if(severity < ErrorException) --> warning * return TCL_OK ??? diff -r c01449a5a8df -r 23b8c0b311ac VisualMagick/installer/inc/version.isx --- a/VisualMagick/installer/inc/version.isx Fri Sep 13 14:40:28 2024 -0500 +++ b/VisualMagick/installer/inc/version.isx Sun Sep 15 17:01:29 2024 -0500 @@ -10,5 +10,5 @@ #define public MagickPackageName "GraphicsMagick" #define public MagickPackageVersion "1.4" -#define public MagickPackageVersionAddendum ".020240913" -#define public MagickPackageReleaseDate "snapshot-20240913" +#define public MagickPackageVersionAddendum ".020240914" +#define public MagickPackageReleaseDate "snapshot-20240914" diff -r c01449a5a8df -r 23b8c0b311ac config/type-urw-base35-otf.mgk.in --- a/config/type-urw-base35-otf.mgk.in Fri Sep 13 14:40:28 2024 -0500 +++ b/config/type-urw-base35-otf.mgk.in Sun Sep 15 17:01:29 2024 -0500 @@ -1,10 +1,12 @@ <?xml version="1.0"?> <!-- -Mapping for Artifex urw-base35-fonts available from https://github.com/ArtifexSoftware/urw-base35-fonts -and typically installed under /usr/share/fonts/opentype/urw-base35 on a Debian/Ubuntu system as +Mapping for Artifex urw-base35-fonts OpenType fonts available from +https://github.com/ArtifexSoftware/urw-base35-fonts and typically installed +under /usr/share/fonts/opentype/urw-base35 on a Debian/Ubuntu system as part of the fonts-urw-base35 package. Starting with Ubuntu 22.04 LTS. -Font mapping comes from /etc/ghostscript/fontmap.d/10fonts-urw-base35.conf on a Debian/Ubuntu system. +Font mapping comes from /etc/ghostscript/fontmap.d/10fonts-urw-base35.conf +on a Debian/Ubuntu system. --> <typemap> <type diff -r c01449a5a8df -r 23b8c0b311ac config/type-urw-base35-t1.mgk.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/type-urw-base35-t1.mgk.in Sun Sep 15 17:01:29 2024 -0500 @@ -0,0 +1,410 @@ +<?xml version="1.0"?> +<!-- +Mapping for Artifex urw-base35-fonts Postscript Type 1 fonts available from +https://github.com/ArtifexSoftware/urw-base35-fonts and typically installed +under /usr/share/fonts/type1/urw-base35 on a Debian/Ubuntu system as +part of the fonts-urw-base35 package. Starting with Ubuntu 22.04 LTS. + +Font mapping comes from /etc/ghostscript/fontmap.d/10fonts-urw-base35.conf +on a Debian/Ubuntu system. +--> +<typemap> + <type + name="AvantGarde-Book" + fullname="AvantGarde Book" + family="AvantGarde" + foundry="URW" + weight="400" + style="normal" + stretch="normal" + format="type1" + metrics="@[email protected]" + glyphs="@[email protected]" + /> + <type + name="AvantGarde-BookOblique" + fullname="AvantGarde Book Oblique" + family="AvantGarde" + foundry="URW" + weight="400" + style="oblique" + stretch="normal" + format="type1" + metrics="@[email protected]" + glyphs="@[email protected]" + /> + <type + name="AvantGarde-Demi" + fullname="AvantGarde DemiBold" + family="AvantGarde" + foundry="URW" + weight="600" + style="normal" + stretch="normal" + format="type1" + metrics="@[email protected]" + glyphs="@[email protected]" + /> + <type + name="AvantGarde-DemiOblique" + fullname="AvantGarde DemiOblique" + family="AvantGarde" + foundry="URW" + weight="600" + style="oblique" + stretch="normal" + format="type1" + metrics="@[email protected]" + glyphs="@[email protected]" + /> + <type + name="Bookman-Demi" + fullname="Bookman DemiBold" + family="Bookman" + foundry="URW" + weight="600" + style="normal" + stretch="normal" + format="type1" + metrics="@[email protected]" + glyphs="@[email protected]" + /> + <type + name="Bookman-DemiItalic" + fullname="Bookman DemiBold Italic" + family="Bookman" + foundry="URW" + weight="600" + style="italic" + stretch="normal" + format="type1" + metrics="@[email protected]" + glyphs="@[email protected]" + /> + <type + name="Bookman-Light" + fullname="Bookman Light" + family="Bookman" + foundry="URW" + weight="300" + style="normal" + stretch="normal" + format="type1" + metrics="@[email protected]" + glyphs="@[email protected]" + /> + <type + name="Bookman-LightItalic" + fullname="Bookman Light Italic" + family="Bookman" + foundry="URW" + weight="300" + style="italic" + stretch="normal" + format="type1" + metrics="@[email protected]" + glyphs="@[email protected]" + /> + <type + name="Courier" + fullname="Courier Regular" + family="Courier" + foundry="URW" + weight="400" + style="normal" + stretch="normal" + format="type1" + metrics="@[email protected]" + glyphs="@[email protected]" + /> + <type + name="Courier-Bold" + fullname="Courier Bold" + family="Courier" + foundry="URW" + weight="700" + style="normal" + stretch="normal" + format="type1" + metrics="@[email protected]" + glyphs="@[email protected]" + /> + <type + name="Courier-Oblique" + fullname="Courier Regular Oblique" + family="Courier" + foundry="URW" + weight="400" + style="oblique" + stretch="normal" + format="type1" + metrics="@[email protected]" + glyphs="@[email protected]" + /> + <type + name="Courier-BoldOblique" + fullname="Courier Bold Oblique" + family="Courier" + foundry="URW" + weight="700" + style="oblique" + stretch="normal" + format="type1" + metrics="@[email protected]" + glyphs="@[email protected]" + /> + <type + name="Helvetica" + fullname="Helvetica Regular" + family="Helvetica"