homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Site Graphics and Multimedia Design
Forum Library, Charter, Moderators: not2easy

Site Graphics and Multimedia Design Forum

Opera, PNGs and gamma settings
anyone noticed a problem?

 7:04 pm on Aug 17, 2001 (gmt 0)

Given any format PNG (8 bit paletised, 4 bit, or 24 bit RGB), Opera seems to render the image with a slightly brighter contrast. This causes a mismatch with the colours in the HTML.

The problem is NOT with the content of the image itself... maybe something to do with the header info. I saved the files with Paint Shop Pro 6.0.

It works fine in other browsers, and Opera also handles Jpegs and Gifs ok.

Has anyone else noticed this?




 8:42 pm on Aug 17, 2001 (gmt 0)

I've had tons of problems ever getting image colors to *precisely* match website/html specified colors. Most of my probs were with PhotoShop, GIF format & NN/IE, as I don't spend much time with PSP or Opera...

There are innumerable problems that can arise with differences between platform/monitor/user settings/browser color settings/preferences/color profiles that simply cannot be completely overcome. Look at any site on 10 different machines, and you'll get 10 different renditions of your colors. The color matching precision available in print design/proper color profiling is something I really miss when I'm doing web work...

The only solution I've come up with is to use transparency as much as possible, so no 'border' color on my image overlays the "same" color on my page, and try not to make my images/over page appearance reliant on precise color matching between the html colors and the images. In other words: avoid the problem through page design, rather than trying to solve it.

I'd love to hear some PNG/Opera users chime in here though: Is this particular "brighter contrast" glitch something that can be reliably overcome?


 11:15 pm on Aug 17, 2001 (gmt 0)

Here's the scoop on Opera's support for various PNG functionality from the PNG site [libpng.org]

Opera [Opera Software] (Windows 3.x, Windows 9x/NT, BeOS, Linux) - version 3.51 and later;
broken binary transparency (apparently only for palette-based images, where the alpha value of the first palette entry is misinterpreted as the index of the palette entry to be made fully transparent, a la GIF);
progressive display;
full gamma support in non-beta versions;
bogus "out of place IHDR" errors and segfaults in Linux version;

(Version 3.50 also supports PNG via old-style plug-ins, such as PNG Live 1.0, that support neither transparency nor progressive display

My guess would be that the embedded gamma information is what's causing the mismatch, since Paintshop Pro doesn't offer gamma support, but Opera is still trying to read whatever that application writes into the PNG file and running with it.

One fix I can see, if this is the case, would be to use an image editor that does offer gamma support. Photoshop 5.5 and up does - that's what I'm using. Fireworks doesn't support gamma at this time, and neither does CorelDraw.

Another fix might be to use a solid-color background image, rather than relying on the HTML defined bgcolor. Also, sometimes the bgcolor defined in a browser's CSS engine gives different results from the HTML defined colors. That's worth a try.

Netscape 6 is the first major browser to give respectable support for PNG gamma, as well alpha channel and progressive images. Explorer 6 is still a wreck in this area.

PNG is a very complex file type, and I can't claim to have it all mastered right now. I'm probably going to wait for the next round of browsers to use png images in any commercial work, since support is still so spotty at present.

There's some solid information about gamma and PNG's, as well as test images, on this page [libpng.org].


 11:26 pm on Aug 17, 2001 (gmt 0)

I've had trouble with Photoshop before... but i think the problem is browser unrelated. Photoshop does something strange sometimes when you flatten layers. Colours get modified, but it doesn't reflects in the image content. If you select all, and copy to a new canvas and save again, it might solve the problem.

Paintshop pro tends to create smaller files with Gif/Png anyway, so give that a try to optimise your files.


 12:09 am on Aug 18, 2001 (gmt 0)

There's no transparency involved... i've set the background explicitely.

Thanks for the tips. I reckon the world is just not quite ready for PNG then! Back to the drawing board ;)


 3:45 am on Aug 21, 2001 (gmt 0)

I had the same problems in Opera with both normal and transparent PNGs. I did a high res, uncompressed PNG and viewed the comp page through Opera, did a screen capture, and resaved with tweaked colors. Kind of a botched workaround, but it eliminated the problem. (At least I could see where to tweak the colors to match.)

No problems in IE, some of the same in Netscape. I don't know that there's any perfect solution. Opera seems to sharpen contrasts just a wee bit, from what I've been able to compare, and it can make all the difference.



 10:25 am on Aug 21, 2001 (gmt 0)

Tedster That is for version 3.51, which was the first version to support PNG's (4 years ago). That's not in Opera today.

I've been trying to find out an answer from the Opera PNG guy, but no luck so far.


 7:17 pm on Aug 21, 2001 (gmt 0)

I'd like to avoid tweaking the content of the image, since that will make other browsers go wrong!!

I didn't have any luck with Photoshop's gamma settings...


 6:08 am on Mar 7, 2002 (gmt 0)

The png code was scrapped in v4 and again completely replaced with new code for 6.0. It's a different story again Tedster. I can't find any info on opera.com about the new support, but I do know, v3 and v6 are quite different. (v6 supporting alpha channel for one)

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Site Graphics and Multimedia Design
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved