octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #42714] imcrop 3.8.1 fails if the input image


From: anonymous
Subject: [Octave-bug-tracker] [bug #42714] imcrop 3.8.1 fails if the input image is identically zero
Date: Wed, 09 Jul 2014 02:56:51 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0

URL:
  <http://savannah.gnu.org/bugs/?42714>

                 Summary: imcrop 3.8.1 fails if the input image is identically
zero
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Wed 09 Jul 2014 02:56:50 AM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Crash
                  Status: None
             Assigned to: None
         Originator Name: lutz andersohn
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.8.1
        Operating System: GNU/Linux

    _______________________________________________________

Details:

if imcrop is called with an image like 

OutImg = imcrop(InImg, [StartX StartY LenX LenY])

and if InImg only contains zero (0) imgcrop failes with
get: unknown root property cdata


cause: the if-condition in imcrop line 132

 elseif (fnargin == 1 && ishandle (varargin{1}))

evaluates to true, even though varargin{1} is not a figure but an image array.
For some reason ishandle() thinks that an image array with only zero values is
a figure or graphic handle.
As soon as any value in the array is not zero the imcrop call works as
expected.





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?42714>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]