Support correct error messages for image decoding problems

NEW
Unassigned

Status

()

Core
ImageLib
14 years ago
4 years ago

People

(Reporter: Aaron Kaluszka, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

14 years ago
The generic "image could not be displayed because it contains errors" message is
not always suitable, and may be downright incorrect.  Thus, the decoder should
be able to pass a string with the actual problem so the user can see what's
wrong (i.e. feature not supported).  See bug 204520 comment 75.
The error message is generated before Mozilla loads the a image file.

If you load a image Url, Mozilla generates a hidden html file with a IMG SRC
link and the error message as ALT text.
(you can see that if you load a image URL and open the image properties)

I think the current error message is ok for Joe User and that we don't need more
informations.
looks like the statusArg argument of imgIDecoderObserver::OnStopDecode is meant
for this:
http://lxr.mozilla.org/seamonkey/source/modules/libpr0n/public/imgIDecoderObserver.idl#77

now nsImageDocument.cpp
http://lxr.mozilla.org/seamonkey/source/content/html/document/src/nsImageDocument.cpp#424
must only be changed to make use of that parameter, e.g. change the alt text,
and the decoders must pass the error message to onstopdecode.
(Reporter)

Comment 3

14 years ago
Matti: the way that that HTML file is generated already has a bug filed against
it (the ALT text for the image shows that same error message).  While we might
not need more information now, we will as soon as MNG-VLC goes in.

Comment 4

14 years ago
The real problem I see with current implementation is that we tell the user "the
image has errors" even if just our processing of the image showed up errors or
we don't support some feature the image is using or some subformat it is using.
If the decoders knows about an error other than a corrupted/malformed image, and
let us know about it, I believe we should also tell the user.
The message could be changed to:
"image could not be displayed. <reason>"
taking.
Target Milestone: --- → mozilla1.7alpha

Comment 6

11 years ago
Whats wrong about this generic warning is that it doesn't convey wether
- the image contains an error
- Firefox (imagelib) doesn't support the format, Bug 44781 Support CMYK, YCCK JPEGs
- Firefox (imagelib) is broken

I had to download the image, check locally using irfanview to see the bug is in Mozilla, then had to search imagelib for its 167 open bugs to find Bug 44871
Assignee: jdunn → nobody
QA Contact: tpreston → imagelib
Indeed we should try to do a better job here.
Summary: Support custom error messages for image decoding problems → Support correct error messages for image decoding problems
Target Milestone: mozilla1.7alpha → ---
You need to log in before you can comment on or make changes to this bug.