*alexandre* has asked for the wisdom of the Perl Monks concerning the following question:
It upload the image well but the thumbnail is not created, any idea ?? THx#!"C:\xampp\perl\bin\perl.exe" use CGI; use Image::Thumbnail; my $imgdir= "C:/Users/41786/Documents/recordz1/upload"; my $query = new CGI; uploadImage('testFileUploadAndThumb.jpg'); sub uploadImage { my $name = shift || ''; my $file = $query->param('image'); open(LOCAL, ">$imgdir/$name.jpg") or print 'error'; my $file_handle = $query->upload('image'); + binmode LOCAL; while(<$file_handle>) { print LOCAL; } close($file_handle); close(LOCAL); createImageMagickThumb("$name"); } sub createImageMagickThumb { my $filename = shift || ''; my $t = new Image::Thumbnail( size => 55, create => 1, input => '$imgdir/$filename', outputpath => '$imgdir/test.$filename', ); print "Content-Type: text/html\n\n"; print "outputpath => '$imgdir/test.$filename'"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Image::Thumbnail not created
by holli (Abbot) on Jul 12, 2019 at 13:52 UTC | |
by *alexandre* (Scribe) on Jul 12, 2019 at 14:25 UTC | |
Re: Image::Thumbnail not created
by hippo (Archbishop) on Jul 12, 2019 at 13:40 UTC | |
Re: Image::Thumbnail not created (updated)
by AnomalousMonk (Archbishop) on Jul 12, 2019 at 14:15 UTC |