20 lines
778 B
Text
20 lines
778 B
Text
$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);
|