Closed
Bug 111037
Opened 23 years ago
Closed 23 years ago
browser won't show Mac PNG
Categories
(Core :: Graphics: ImageLib, defect)
Core
Graphics: ImageLib
Tracking
()
RESOLVED
FIXED
People
(Reporter: rushing, Assigned: nivedita)
References
()
Details
Attachments
(3 files, 1 obsolete file)
491 bytes,
patch
|
Details | Diff | Splinter Review | |
763 bytes,
patch
|
pavlov
:
review+
tor
:
superreview+
|
Details | Diff | Splinter Review |
624 bytes,
patch
|
pavlov
:
review+
blizzard
:
superreview+
|
Details | Diff | Splinter Review |
tested in 2001112008 The url is a PNG created with Adobe Photoshop 5.0le on Mac OS 9.0.4. I uploaded a series of PNGs to illustrate a bug in the location bar, but I found that they would not appear. I opened them again in APS, fine; N4, fine; what's wrong, Moz?
Reporter | ||
Comment 1•23 years ago
|
||
I just tested this in Netscape 6.1-linux, and the image is terribly mangled. Perhaps taken out of tree?
Confirmed using Mac/2001112011 (0.9.6). Nothing is displayed at all when this image is accessed either via the URL provided or by saving it as a local PNG file. Mac IE partially displays the image, but in black and white. The applications Photoshop, GraphicConverter, and QuickTime Player all display the image properly. I have no idea what's going on here. I even resaved a copy from GraphicConverter and it still wouldn't display in Mozilla. FWIW, it's a RGB, 8-BPC image.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter | ||
Comment 3•23 years ago
|
||
Linux testers: this probably won't show up if you did --use-system-png=. The testcase does not work on any platform, but it works in IE5-Win98. That's a definite sign it should work properly, when MS supports open PNG better than Mozilla... Changing plat/os to all-maybe somebody should consider renaming this bug. Is there just something wrong with non-standard file formats or something, anybody?
OS: Mac System 9.x → All
Hardware: Macintosh → All
Updated•23 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.9
Comment 4•23 years ago
|
||
giving to nivedita
Assignee: pavlov → nivedita
Status: ASSIGNED → NEW
Target Milestone: mozilla0.9.9 → ---
Assignee | ||
Comment 5•23 years ago
|
||
This image is displayed properly in Netscape 4.7, but appears corrupted in IE6.0 , mozilla on windows 98 and windows NT platforms. The image viewed in NS4.7 is in sync to the image when viewed in photoshop.
Comment 6•23 years ago
|
||
With build 20020202 on Win2k it displays correctly (it uses the quicktime plugin). Maby that's because I've quicktime installed?
Assignee | ||
Comment 7•23 years ago
|
||
png_get_uint_32 for gamma is returning a value( 2^32 -1 ) in this case, which when type casted to png_fixed_point, results in an overflow, hence gamma results in having a value of -1. Having an incorrect gamma results in garbled display of the colors. Hence added a check if overflow occurs set the gamma to the default value 0.45455. We can run in overflow error for the following parameters as well, which use png_get_uint_32 and are later are type casted to png_fixed_point. a) length -> chunk_length b) width -> width of the image c) height -> height of the image d) int_x_white & int_y_white -> Chromaticity of the white e) int_x_red & int_y_red -> Chromaticity of the red f) int_x_green & int_y_green -> Chromaticity of the green g) int_x_blue & int_y_blue -> Chromaticity of the blue h) idat_size
Assignee | ||
Comment 8•23 years ago
|
||
png_get_uint_32 for gamma is returning a value( 2^32 -1 ) in this case, which when type casted to png_fixed_point, results in an overflow, hence gamma results in having a value of -1. Having an incorrect gamma results in garbled display of the colors. Hence added a check if overflow occurs set the gamma to the default value 0.45455. We could run into overflow error for the following parameters as well, which use png_get_uint_32 and are later are type casted to png_fixed_point. a) length -> chunk_length b) width -> width of the image c) height -> height of the image d) int_x_white & int_y_white -> Chromaticity of the white e) int_x_red & int_y_red -> Chromaticity of the red f) int_x_green & int_y_green -> Chromaticity of the green g) int_x_blue & int_y_blue -> Chromaticity of the blue h) idat_size -> size of the IDAT Should we return an png_error for the above if they have invalid value?
Assignee | ||
Updated•23 years ago
|
Attachment #68304 -
Attachment is obsolete: true
Attachment #68304 -
Attachment is patch: false
Comment 9•23 years ago
|
||
nivedita: I'd prefer to not change the libpng source if possible. Is it possible to fix this in the decoder code?
Assignee | ||
Comment 10•23 years ago
|
||
settting the invalid gamma to a default gamma value in the nsPNGDecoder.
Comment 11•23 years ago
|
||
Comment on attachment 68837 [details] [diff] [review] patch file incorporating comments given by Stuart r=pavlov
Attachment #68837 -
Flags: review+
Comment 12•23 years ago
|
||
Comment on attachment 68837 [details] [diff] [review] patch file incorporating comments given by Stuart sr=tor
Attachment #68837 -
Flags: superreview+
Comment 13•23 years ago
|
||
checked in fix
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 14•23 years ago
|
||
Um...guys? png_get_gAMA() puts the value in aGamma. What the heck are you poking around in info_ptr->gamma for? (Tor, you should have caught this!) Greg
Comment 15•23 years ago
|
||
Reopen to clean up fix.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 16•23 years ago
|
||
Comment 17•23 years ago
|
||
Comment on attachment 70746 [details] [diff] [review] don't look inside info_ptr r=pavlov
Attachment #70746 -
Flags: review+
Comment 18•23 years ago
|
||
Comment on attachment 70746 [details] [diff] [review] don't look inside info_ptr sr=blizzard
Attachment #70746 -
Flags: superreview+
Comment 19•23 years ago
|
||
> a) length -> chunk_length > b) width -> width of the image > c) height -> height of the image > d) int_x_white & int_y_white -> Chromaticity of the white > e) int_x_red & int_y_red -> Chromaticity of the red > f) int_x_green & int_y_green -> Chromaticity of the green > g) int_x_blue & int_y_blue -> Chromaticity of the blue > h) idat_size -> size of the IDAT > > Should we return an png_error for the above if they have invalid value? png_error should be issued for bad width, height, or idat_size. For bad chromaticity, a png_warning should be issued and the cHRM chunk abandoned. I'll look into modifying libpng to handle these problems. Glenn
Comment 21•23 years ago
|
||
Checked in.
Status: REOPENED → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → FIXED
Comment 22•23 years ago
|
||
I don't see where this got checked in. I'm probably overlooking it but thought I'd doublecheck. tor, has this really landed?
Comment 23•23 years ago
|
||
Yes, it's in: revision 1.28 date: 2002/02/22 01:29:55; author: tor%cs.brown.edu; state: Exp; lines: +2 -1 Bug 111037 - don't look inside png info_ptr. r=pavlov, sr=blizzard, a=asa.
Comment 24•23 years ago
|
||
>We could run into overflow error for the following parameters as well, which >use png_get_uint_32 and are later are type casted to png_fixed_point. > >a) length -> chunk_length >b) width -> width of the image >c) height -> height of the image >d) int_x_white & int_y_white -> Chromaticity of the white >e) int_x_red & int_y_red -> Chromaticity of the red >f) int_x_green & int_y_green -> Chromaticity of the green >g) int_x_blue & int_y_blue -> Chromaticity of the blue >h) idat_size -> size of the IDAT Libpng-1.2.2 will check for all of these and issue warnings or errors as appropriate. I'd appreciated someone trying libpng-1.2.2beta2, which is available from libpng.sf.net, with mozilla. Glenn
Comment 25•23 years ago
|
||
libpng1.2.2beta2 seems to work fine with mozilla. The version of libpng in the mozilla tree has a few local changes (see bug 125845). Should any of these be folded into the official tree?
Comment 26•23 years ago
|
||
Png_zalloc, png_zfree, and png_handle_as_unknown will be modified as suggested in libpng-1.2.2. I hope you are not using png_info_init, png_read_destroy, or png_write_destroy because they are deprecated in applications. Glenn
Comment 27•23 years ago
|
||
None of the latter three functions are used by nsPNGDecoder.
Comment 28•23 years ago
|
||
Your patch that adds PNGAPI to png_info_init, png_read_destroy, and png_write_destroy shouldn't be necessary then. It shouldn't have been needed in version 1.0.9 either.
You need to log in
before you can comment on or make changes to this bug.
Description
•