Closed
Bug 17076
Opened 25 years ago
Closed 25 years ago
misnamed local image file causes load to fail
Categories
(Core :: Graphics: ImageLib, defect, P3)
Core
Graphics: ImageLib
Tracking
()
VERIFIED
FIXED
M12
People
(Reporter: kipp, Assigned: pnunn)
References
Details
Attachments
(2 files)
If you take a jpeg file, and name it "foo.gif" and try to load it using an image
tag from a file: document, the load doesn't work and the throbber spins forever.
I've attached two files: a testcase, and a test image. Make sure you leave the
name of the image wrong to see what I saw.
Comment 3•25 years ago
|
||
Great minds think alike; see bug #17064.
yep. I just changed the code so that the decoder is
associated with the mimetype with is associated with
the file extension. If the file extension is unknown and
we don't have a decoder for it, we check the data stream
to see if we can recognize it from our short, fixed list.
But if the person who named the image gives it the wrong
extension, and that decoder can't make sense of it, we give up.
This design will allow users to add their own decoders very easily.
When I get a breather I can look at adding some smarts to each decoder
to verify the data stream and give it up if it can't make sense of it.
And then the data stream would go to the mime sniffing function.
-pn
*** Bug 17064 has been marked as a duplicate of this bug. ***
I reworked the mime sniffer code and I have a fix for this.
Will check in as soon as I test all platforms, and get code review.
-pn
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
fix checked in.
Instead of checking the data stream for a mime type after
failing to load a component, the imglib now does it before
the component loading. If there is a discrepancy between the
user supplied mime type and A Recognized Mime type (gif, jpg, jfif, jpeg,
png) we believe the data stream.
-pn
Updated•25 years ago
|
OS: Linux → All
Hardware: PC → All
Comment 8•25 years ago
|
||
Changing Platform to 'All'.
Comment 9•25 years ago
|
||
Verified fixed on:
- Mac OS (1999110913)
- Win32 (1999110911)
Will formally mark as verified after checking Linux.
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 10•25 years ago
|
||
Checked Linux (1999110808). Verified fixed.
You need to log in
before you can comment on or make changes to this bug.
Description
•