in reply to Re: Thumbnails and Filehandles
in thread Thumbnails and Filehandles
#!/usr/bin/perl use strict; use warnings; use Image::Magick; use CGI qw/:standard/; my $cgi = new CGI; my $file = $cgi->param('image'); if ( !$file ) { print header,start_multipart_form(), filefield('image',50,80), submit(-name=>'upload', -value=>'Upload'), end_form(); } else { print header; print "<br>FILE: $file\n"; my $image = Image::Magick->new; my $fh = upload('image'); $image->Read(file=>$fh); my $big_image = $image->ImageToBlob(); print "<br>DATA: $big_image\n"; }
|
---|