From aebae0c5041d1d7a2c97c5711b36b7688b6f6442 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Tue, 9 Aug 2005 17:52:09 +0000 Subject: [PATCH] Added another minor hack for making sure we only get the first page in the PNG. (ImageMagick seems to output all the PNGs on stdout in order, so we just do another convert pass, which removes all but the first.) --- createpdf.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/createpdf.pl b/createpdf.pl index 1af0b87..e74ab0e 100755 --- a/createpdf.pl +++ b/createpdf.pl @@ -159,7 +159,7 @@ if (defined($size) && $size > 0) { # Make a thumbnail from the finished PDF, for later reference. (Output to # stdout is so we make sure we get only the first page; it's the simplest # hack I can find offhand. :-) ) - system("convert -resize 192x192 output/$pdf_filename png:- > output/$pdf_filename.png"); + system("convert -resize 192x192 output/$pdf_filename png:- | convert png:- png:- > output/$pdf_filename.png"); open DESC, ">output/$pdf_filename.desc"; if ($url =~ /^http/i) { -- 2.39.2