graphicsmagick: update to 1.3.46
authorAlexandru Ardelean <redacted>
Wed, 22 Apr 2026 09:19:49 +0000 (12:19 +0300)
committerAlexandru Ardelean <redacted>
Wed, 6 May 2026 18:05:36 +0000 (21:05 +0300)
Security fixes:
- Fix MSL/SVG parsers to use libxml2 SAX handlers, removing archaic
  cruft with potential security issues
- Fix JP2 Jasper max_samples calculation to avoid DoS via huge images
- Apply image dimension resource limits and fix heap write overflow in JXL
- Fix WPG palette buffer allocation (SF bug #750)
- Fix ColorFloodfillImage() to error when clip-mask is present

Bug fixes:
- Fix JPEG CMYK inversion regression introduced in 1.3.43
- Re-implement PNG8 writer with correct indexed-color and binary transparency
- Re-write HEIF reader (AVIF, HEIC) based on heif_image_get_plane_readonly2(),
  adding deep image support and YCbCr/monochrome output
- Fix Hull transform arithmetic overflow regression from Oct 2023
- Fix -crop percentage tiling regression
- Re-enable EXPERIMENTAL_EXIF_TAGS by default with known issues fixed
- Fix Magick++ thread safety regression since 2003 (pthreads support)

New features:
- Add support for newer Artifex urw-base35-fonts (OpenType and Type 1)
- Add ImagesResource limit to control simultaneous loaded images
- Add EXIF Version 3.0 decoding and validation
- Add preliminary MP4 coder with HEIF sequence support
- Require C99 compiler compatibility in build infrastructure

Signed-off-by: Alexandru Ardelean <redacted>
multimedia/graphicsmagick/Makefile
multimedia/graphicsmagick/test.sh [new file with mode: 0644]

index 9dd41e408cd416133fabe21d52200e194bf23450..f98c6cf98af7d7be5ae15b632141278a25fa2f75 100644 (file)
@@ -5,13 +5,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=graphicsmagick
-PKG_VERSION:=1.3.45
+PKG_VERSION:=1.3.46
 PKG_RELEASE:=1
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/GraphicsMagick-$(PKG_VERSION)
 PKG_SOURCE:=GraphicsMagick-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@SF/graphicsmagick
-PKG_HASH:=dcea5167414f7c805557de2d7a47a9b3147bcbf617b91f5f0f4afe5e6543026b
+PKG_HASH:=c7c706a505e9c6c3764156bb94a0c9644d79131785df15a89c9f8721d1abd061
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=Copyright.txt
diff --git a/multimedia/graphicsmagick/test.sh b/multimedia/graphicsmagick/test.sh
new file mode 100644 (file)
index 0000000..7fa1f2e
--- /dev/null
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+case "$1" in
+graphicsmagick)
+       # Version check
+       gm version | grep -F "$2"
+
+       # Create a small test image
+       gm convert -size 32x32 xc:white /tmp/gm-white.png
+       [ -f /tmp/gm-white.png ] || { echo "FAIL: PNG creation"; exit 1; }
+
+       # Identify the created image; verify format and dimensions
+       gm identify /tmp/gm-white.png | grep -E "PNG.*32x32"
+
+       # Convert to JPEG
+       gm convert /tmp/gm-white.png /tmp/gm-white.jpg
+       gm identify /tmp/gm-white.jpg | grep "JPEG"
+
+       # Resize: create a 64x64 image, resize to 16x16, confirm dimensions
+       gm convert -size 64x64 xc:blue -resize 16x16! /tmp/gm-small.png
+       gm identify /tmp/gm-small.png | grep -E "PNG.*16x16"
+
+       # Color: create a 1x1 red pixel, sample it back
+       gm convert -size 1x1 xc:red /tmp/gm-red.png
+       gm convert /tmp/gm-red.png -format '%[pixel:p{0,0}]' info: | grep -iE "red|ff0000"
+
+       # Draw: add text/annotate (exercises the font/draw engine)
+       gm convert -size 64x16 xc:white -font Helvetica -pointsize 10 \
+               -draw "text 2,12 'gm'" /tmp/gm-text.png 2>/dev/null || \
+       gm convert -size 64x16 xc:white \
+               -draw "text 2,12 'gm'" /tmp/gm-text.png
+       gm identify /tmp/gm-text.png | grep "PNG"
+
+       # Composite: overlay one image on another
+       gm composite -compose Over /tmp/gm-red.png /tmp/gm-white.png /tmp/gm-composite.png
+       gm identify /tmp/gm-composite.png | grep "PNG"
+
+       rm -f /tmp/gm-white.png /tmp/gm-white.jpg /tmp/gm-small.png \
+             /tmp/gm-red.png /tmp/gm-text.png /tmp/gm-composite.png
+       ;;
+esac
git clone https://git.99rst.org/PROJECT