bugGNU Octave - Bugs: bug #30365, reading all frames in a...

 
 

bug #30365: reading all frames in a multi-frame image

Submitter:  Manuchehr Aminian <manuchehr>
Submitted:  Tue 06 Jul 2010 10:11:35 AM UTC
   
 
Category:  Libraries Severity:  1 - Wish
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  dbateman
Originator Name:  Open/Closed:  * Closed
Release:  * 3.3.51 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 08 Jul 2010 06:26:44 PM UTC, comment #1: 

The matlab way of doing this would be with a syntax

M = imread('example.GIF','frames','all');

The changeset

http://hg.savannah.gnu.org/hgweb/octave/rev/6035bf68a755

implements this behavior

D.

David Bateman <dbateman>
Group Member
Tue 06 Jul 2010 10:11:35 AM UTC, original submission:  

In short: imread returns an error trying to read more frames than an image has.  I'd like it to return all frames of an arbitrary multiple-frame image (e.g. .gif, .tiff files) and store them in an array.

Currently, imread() supports reading multiple frames of a .GIF (say) image using an optional second argument.  For example, if I know my example.GIF has 16 frames, I can do:

M = imread('example.GIF',7);

to read one frame, or

M = imread('example.GIF',1:16);

to read a range of frames (though this isn't in the documentation for imread() at the moment).  However, if I do not know the number of frames in my image, and tried to read the first 17 frames of my image that only has sixteen frames,

M = imread('example.GIF',1:17);

Octave returns an error with no array.  This is really the problem.  If there is not some way to do this already, the cleanest way I see to fix it is to modify imfinfo to be able to detect the number of frames in an image (if this is something that's in the metadata of GIF files, i'm not sure), then use that to implement a parameter to read all the frames in imread, or if the user is requesting to read frames that don't exist, return what can be read up to that point.

Manuchehr Aminian <manuchehr>

 

(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 dbateman (Posted a comment)
  • -email is unavailable- added by manuchehr (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-07-08 dbateman Severity3 - Normal 1 - Wish
        Item GroupNone Feature Request
        StatusNone Fixed
        Assigned toNone dbateman
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code