From 171d7d3a29565fb1d9f017aff3ad0f22d1d72302 Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 25 Jan 2009 17:16:02 +0000 Subject: [PATCH] strip metadata from thumbnails --- ext/handle_pixel/main.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/handle_pixel/main.php b/ext/handle_pixel/main.php index 489d0d4e..29081a3b 100644 --- a/ext/handle_pixel/main.php +++ b/ext/handle_pixel/main.php @@ -99,8 +99,10 @@ class PixelFileHandler implements Extension { $q = $config->get_int("thumb_quality"); $mem = $config->get_int("thumb_max_memory") / 1024 / 1024; // IM takes memory in MB + // convert to bitmap & back to strip metadata -- otherwise we + // can end up with 3KB of jpg data and 200KB of misc extra... // "-limit memory $mem" broken? - exec("convert {$inname}[0] -geometry {$w}x{$h} -quality {$q} jpg:$outname"); + exec("convert {$inname}[0] -geometry {$w}x{$h} bmp:- | convert bmp:- -quality {$q} jpg:$outname"); return true; }