From e15e2f9118f5ae1bc5a7d0853b186b01f4089cc2 Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Thu, 10 Apr 2008 02:35:53 -0400 Subject: [PATCH] Bugfix: Handling cases where the image is the correct pixel dimensions Signed-off-by: Joshua Ferraro --- tools/picture-upload.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/picture-upload.pl b/tools/picture-upload.pl index 68684fbee0..695adb3aaf 100755 --- a/tools/picture-upload.pl +++ b/tools/picture-upload.pl @@ -243,6 +243,11 @@ sub handle_file { $imgfile = $img[0]; warn "$filename is " . length($imgfile) . " bytes after resizing."; undef $image; # This object can get big... + } else { + my @img = $image->ImageToBlob(); + $imgfile = $img[0]; + $debug and warn "$filename is " . length($imgfile) . " bytes."; + undef $image; } $debug and warn "Image is of mimetype $mimetype"; my $dberror = PutPatronImage($cardnumber,$mimetype, $imgfile) if $mimetype; -- 2.39.5