blob: 55c017eb4af61e3f81bfb5f2df39b7f33d084765 (
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.1 2008/07/13 20:35:46 tonnerre Exp $
--- work/wml-2.0.9/wml_contrib/wmg.cgi.orig 1999-05-20 13:39:28.000000000 +0200
+++ work/wml-2.0.9/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);
|