in reply to Re^3: Use of uninitialized value $pic
in thread Use of uninitialized value $pic
The code snippet at the start of the subroutine is as follows:# Convert to Image::Maggick image my $pic = Image::Magick->new(magick=>'jpg'); # create new image obj +ect $pic->BlobToImage($img); #convert the grabbed blob image to Image::Ma +gick object ## test point A #pass the $pic object to the subroutine and measure image darkness. my $test = ImageNotDark ($pic); #
So the debugger shows that $iutImage is not initialised. At test point A, I temporarily added code to save the $pic image to a file.sub ImageNotDark { # Argument is one reference to an image object. # ImageNotDark compares the image with a blank black canvas. If the c +omparison is # above the defined threshold, the image is bright enough to send (not + dark). # the return value is true if the images is bright enough. my $iutImage = Image::Magick->new; #the image tested for darkness $iutImage->Read(@_); # get the image under test (iut)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Use of uninitialized value $pic
by haukex (Archbishop) on Apr 25, 2017 at 06:28 UTC | |
by dazz (Beadle) on Apr 25, 2017 at 10:57 UTC | |
Re^5: Use of uninitialized value $pic
by zentara (Cardinal) on Apr 25, 2017 at 13:51 UTC | |
by dazz (Beadle) on May 01, 2017 at 10:58 UTC | |
by afoken (Chancellor) on May 01, 2017 at 11:03 UTC | |
by dazz (Beadle) on May 02, 2017 at 03:36 UTC | |
by afoken (Chancellor) on May 03, 2017 at 06:08 UTC | |
by afoken (Chancellor) on May 02, 2017 at 19:02 UTC | |
by Anonymous Monk on May 01, 2017 at 11:16 UTC |