bugGNU Octave - Bugs: bug #42714, image package: imcrop fails if the...

 
 

bug #42714: image package: imcrop fails if the input image is identically zero

Submitter:  None
Submitted:  Wed 09 Jul 2014 02:56:50 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  lutz andersohn Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * other
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 09 Jul 2014 04:47:01 PM UTC, comment #3: 


Fixed with cset d316de4780ce.





This problem has been fixed in the stable version. The fix will
be available in the next minor software release. Thank you for
your bug report.

Carnë Draug <carandraug>
Group Member
Wed 09 Jul 2014 12:28:09 PM UTC, comment #2: 

Confirmed, retagging appropriately. The bug is not with ishandle, because ishandle (0) is always true, 0 is the "root figure". The imcrop function should probably not allow the handle to be zero, and it should probably require a scalar handle rather than allow an array of handles, so that should work to differentiate a handle from an image.

Mike Miller <mtmiller>
Group Member
Wed 09 Jul 2014 03:59:50 AM UTC, comment #1: 

Sorry, wrong category. this is the image package version 2.2.1

However, since I think the bug may be related to ishandle(), maybe its core Octave after all

Lutz <andersl>
Wed 09 Jul 2014 02:56:50 AM UTC, original submission:  

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.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by andersl (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-07-10 mtmiller StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2014-07-09 mtmiller CategoryOctave Function Octave Package
        Item GroupSegfault, Bus Error, etc. Incorrect Result
        StatusNone Confirmed
        Release3.8.1 other
        Summaryimcrop 3.8.1 fails if the input image is identically zero image package: imcrop fails if the input image is identically zero

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code