From 793c3b857c783e57ab54afdbba893e1e50e69c04 Mon Sep 17 00:00:00 2001 From: cr4y Date: Thu, 27 Aug 2026 11:06:02 +1000 Subject: Fix synoptic chart rasterization: switch to pdftoppm BOM's IDY00030 chart-generator update on 2026-08-26 exposed an upstream Ghostscript bug where magick's PDF delegate silently drops all page content but isobars at production DPI. Poppler's pdftoppm renders the same PDFs correctly, so it now does the rasterization step and magick just resizes. Records the incident, remediation, and a separate unfixable BOM-side monochrome-fill defect in doc/rtfm.md. --- synopticChart.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'synopticChart.sh') diff --git a/synopticChart.sh b/synopticChart.sh index 059665d..2da65c0 100755 --- a/synopticChart.sh +++ b/synopticChart.sh @@ -21,7 +21,7 @@ require_cmd() { require_cmd curl require_cmd magick -require_cmd gs +require_cmd pdftoppm # Return the datetime string for the most recently published chart slot. # BOM chart slots: 0000, 0600, 1200, 1800 UTC. @@ -54,7 +54,13 @@ if [ "$curlExit" -gt 0 ]; then exit "$curlExit" fi -magick -density 300 "${latestChart}" -resize 1920x1080 "${dateTime}.png" +# pdftoppm (Poppler), not magick's Ghostscript delegate, does the actual PDF +# rasterization: at 300dpi, gs silently drops all page content but the +# isobars on BOM's current chart-generator output (confirmed upstream +# Ghostscript bug, not fixable here) — see doc/rtfm.md. +pdftoppm -r 300 -png "${latestChart}" "${dateTime}" +magick "${dateTime}-1.png" -resize 1920x1080 "${dateTime}.png" +rm -f "${dateTime}-1.png" mv "${latestChart}" "${RAW_DIR}/" cp "${dateTime}.png" "${ARCHIVE_DIR}/" -- cgit v1.3.1