SPUG: GD file save
marlin
marlingreene at mindspring.com
Tue Jan 4 17:02:15 CST 2000
Dear Perl Gurus...
I used the GD graphic module with success on a couple of projects last
year to create charts from live data and then both display it directly
and save the GD generated image to a file. That was accomplished on an
NT system.
I changed over my server to Linux last September and have had excellent
results with the exception of this strange GD problem...I cannot get
the GD module to save the created image to a file on the hard drive.
Following lines are based on instructions with the GD module...
###print to screen -- this works
binmode (STDOUT);
print $im->gif;
####write to file -- from my NT module docs, works on NT
$imgfile = 'testsave.gif';
$im->gif($imgfile);
####write to file -- from Linux module docs, does not work
$gif_data = $im->gif;
open (MYFILE,">testsave.gif") || die;
binmode MYFILE;
print MYFILE $gif_data;
close DISPLAY;
Neither of these "write" routines will create/save the image. I have
chmod and owner/group names set correctly to allow file creation.
Anyone know what I'm missing with Linux/GD?
Thanks in advance...
Marlin Greene
--
3 Hats Design
INTERNET PRINT ILLUSTRATION
5201 15 Ave NW
Suite 220
Seattle, WA 98107
206.784.1641 phone
206.784.2231 fax
marlin at 3hats.com
www.3hats.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe
Email to majordomo at pm.org: ACTION spug-list your_address
More information about the spug-list
mailing list