- Status Closed
- Percent Complete
- Task Type Patches
- Category Plugins
- Assigned To No-one
- Operating System All players
- Severity Low
- Priority Very Low
- Reported Version Daily build (which?)
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
FS#11819 - image viewer: use magick number in file to determine image type.
this implements suggestions discussed in mailing list ( FS#6321 - Universal Image Viewer(http://www.rockbox.org/mail/archive/rockbox-dev-archive-2010-11/0058.shtml))
get_image_type in image_decoder.c is changed as follows.
1. if it has supported image’s magick value and has assosiated file extension, returns corresponding IMAGE_*.
file will be loaded.
2. if it has supported image’s magick value but *doesn’t* have assosiated file extension, it warns that file extension might not be correct and returns corresponding IMAGE_* determined from the magick value.
file will be loaded.
3. if it *doesn’t* have supported image’s magick value but has supported image file’s file extension, returns corresponding IMAGE_* determined from the extension.
file will not be loaded, and error will be displayed. user can know something is wrong.
4. if it *doesn’t* have supported image’s magick value and *doesn’t* have supported image file’s file extension, returns IMAGE_UNKNOWN.
image viewer skips to next file silently.
get_pic_list imag in imageviewer.c is changed so that it create list of all file.
(if filtering is done at this point, initial loading would take longer, but not confirmed)
2011-01-22 13:47
Reason for closing: Accepted
Additional comments about closing: Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407
Committed in r29110.
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
it seems like i attached wrong version of the patch. this is correct one.
What about situation where the same decoder handles a few variants of the format with different magic values? One example is ppmviewer with magic numbers P2 and P6 both valid.
add both of them to magic_list and files will be loaded fine.
update patch: slightly change error message.
synced.