[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #37369] imread "Index" option is ignored (alwa
From: |
Mark Wistrom |
Subject: |
[Octave-bug-tracker] [bug #37369] imread "Index" option is ignored (always returns first frame) |
Date: |
Wed, 28 Nov 2012 19:09:29 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.4 (KHTML, like Gecko) Ubuntu/12.10 Chromium/22.0.1229.94 Chrome/22.0.1229.94 Safari/537.4 |
Follow-up Comment #1, bug #37369 (project octave):
So, I looked into the imread functionality a bit. Here is what I came up with.
The Matlab spec has the abbreviated functionality for imread for the
different image formats that it supports:
BMP — Windows Bitmap
CUR — Cursor File
(..., idx)
GIF — Graphics Interchange Format
(..., idx) idx is a scalar integer or a
vector of integer values
(..., 'frames', idx) same as above. idx can be 'all'
HDF4 — Hierarchical Data Format
(..., ref) get the ref image. not
necessarily in order
ICO — Icon File
JPEG — Joint Photographic Experts Group
JPEG 2000 — Joint Photographic Experts Group 2000
(..., 'p1','v1','p2','v2',... )
'ReductionLevel' - non-negative integer
'PixelRegion' - {ROWS, COLS} - 2 element vectors representing [START,
STOP]
PBM — Portable Bitmap
PGM — Portable Graymap
PNG — Portable Network Graphics
(..., 'BackgroundColor', BG ) - pretty complicated.
PPM — Portable Pixmap
RAS — Sun Raster
PCX — Windows Paintbrush
TIFF — Tagged Image File Format
(..., 'p1','v1','p2','v2',... )
'Index' -> integer for value
'Info' - structure from imfinfo - improves perf
'PixelRegion' - {ROWS, COLS} - 2 or 3 element vectors
XWD — X Window Dump
=================================
In the Octave code there seems to be very limited support for any of the
additional functionality for the different formats. In fact the only
additional functionality is the GIF support, 'frames' and 'all', which is
transparently passed through to all formats. It is not clear what
GraphicsMagick does with the image index/number information on all formats.
Probably ignores it.
My solution to the problem is to add a check for "Image" so that imread acts
the same as if "frames" were passed in.
The default behaviour is to notice that there were 3 parameters passed in, but
since the second was not "frames" silently error out and return the first
image. Unexpected behaviour is a poor user experience.
The only functionality seems to be
" (..., idx) " for all the format
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?37369>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #37369] imread "Index" option is ignored (always returns first frame),
Mark Wistrom <=