bugGNU Octave - Bugs: bug #43217, imread does not find file

 
 

bug #43217: imread does not find file

Submitter:  Matthias Jüschke <maju>
Submitted:  Sat 13 Sep 2014 09:16:54 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Maju Open/Closed:  * Closed
Release:  * 3.6.4 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 13 Sep 2014 02:55:27 PM UTC, comment #1: 

Thanks for your bug report. I don't think there is a bug here, though. The ls function is supposed to pad filenames with trailing spaces to make a character matrix. And imread takes the full string as the filename to load, it shouldn't try to trim spaces. You should use strtrim if you want to use the rows of ls as file names to other functions. Or use the dir function instead, which returns a struct array of file information instead of a char matrix.

Mike Miller <mtmiller>
Group Member
Sat 13 Sep 2014 09:16:54 AM UTC, original submission:  

With the two files 'test.jpg' and 'test1.jpg'

file=ls('test*.jpg');
h=imread(file(2,:));
error: imread: cannot find test.jpg
error: called from:
error:   /usr/share/octave/3.6.4/m/image/imread.m at line 53, column 5

fails, probably caused by the trailing space.

Matthias Jüschke <maju>

 

(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 maju (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-09-13 mtmiller StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code