summaryrefslogtreecommitdiff
path: root/www/wml/patches/patch-aj
blob: 655e1a3f7d296ffd01a133d9425cb3b40b9bcd7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$NetBSD: patch-aj,v 1.2 2008/08/12 20:09:34 tonnerre Exp $

--- wml_contrib/wmg.cgi.orig	1999-05-20 13:39:28.000000000 +0200
+++ wml_contrib/wmg.cgi
@@ -367,14 +367,7 @@ if ($level >= 1) {
         ($w, $h, $t) = Image::Size::imgsize(\$contents);
         if ($w*$h == 1) {
             #   read image into GD
-            $tmpfile = "/tmp/pe.tmp.$$";
-            unlink($tmpfile);
-            open(TMP, ">$tmpfile");
-            print TMP $contents;
-            close(TMP);
-            open(TMP, "<$tmpfile");
-            $tmpimg = newFromGif GD::Image(TMP);
-            close(TMP);
+            $tmpimg = newFromGifData GD::Image($contents);
             unlink($tmpfile);
             if ($tmpimg->transparent != -1) {
                 my $im = new GD::Image($w, $h);