Forum Moderators: open

Message Too Old, No Replies

Inconsistent colors?

Safari gets things wrong

         

Wertigon

1:33 am on Feb 18, 2005 (gmt 0)

10+ Year Member



Hey all, I made a webpage the other day that had some level 9 compressed PNGs. It works great except for one little detail; The colors seem to have a darker tone than I chose for them in Safari, atleast in the images.

Now, I figured this was a problem with Safari's support for PNGs being kinda bad, but then I looked at the offending pictures themselves and noticed that the colors are #3399FF in GIMP on my Ubuntu-install (like it should be), yet it's #5588FF in Photoshop on the Mac. Same images, yet different colors in different environments.

Does the Mac have a buggy PNG library, or what's going on here?

Oh, and the images are simple gradients from #FFFFF -> #3399FF (for a bar), so it shouldn't affect anything... Right?

Not that this is something I'll loose sleep over, I'm just gonna go with the "Too bad for Safari" rule here, but it'd be nice to know who to blame...

dcrombie

12:25 pm on Feb 18, 2005 (gmt 0)



Macs have always used WYSIWYG colours so chances are Safari is showing it right. Try taking the photos to ImageReady and 'Adjust -> Gamma' to darken them before saving.

Wertigon

2:47 pm on Feb 18, 2005 (gmt 0)

10+ Year Member



Well yeah, but obviously it isn't.

If it's the color #3399FF on my PC, how can it then be #5588FF on the Mac? One *does* assume it should render alike regardless... But it doesn't. So either it's a libPNG bug on the PC side, or a libPNG bug on the Mac side.

Also, it looks like it should on FireFox on Mac...

rocknbil

4:32 pm on Feb 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've experienced "the same thing but different." :-)

Visualize three rows of a table (pls. no hacking table layouts, in this case There Was No Other Way.) The top and bottom of the image has a "frilly border." The image itself would sit on various backgrounds so these strips had to be transparent on the outside - hence they were required to be .gif (or .png, tried both.)

To fully optimize the composite image and maintain quality, the main portion of the image was saved as a .jpg. So you've got three strips - gif, jpg, gif.

This worked out perfectly in all browsers EXCEPT Safari. Safari would always show the .gifs as slightly different than the jpgs no matter what we did, so the image looked "ghosted" at the top and bottom. Finally we threw in the towel, made all three .gifs, and have to live with the larger combined file sizes.

<whine> I'm always frustrated by the fact that I spend 50% of a project's time working it up for "everything else" then have to go back and put almost as much into it just to make it work for the various incarnations of Mac browsers.

And sometimes (as in this case) the client is strictly Mac-based, so the "too bad for Safari" choice is just not an option. </whine>

dcrombie

4:51 pm on Feb 18, 2005 (gmt 0)



I haven't played much with PNG myself. This link [hsivonen.iki.fi] might help explain things.

Wertigon

10:00 pm on Feb 19, 2005 (gmt 0)

10+ Year Member



drcombie: Ah. I see, that explains quite a bit. From that page:

Of the latest versions of various PNG-supporting browsers (at the time of writing in April 2003), Safari is the problem: It applies a gamma change to unlabeled PNGs. This means unlabeled PNGs are not an option for those who want consistent colors in CSS and PNG in Safari.

Since it's a png -> css -> png bar... Well, you get the idea. Oh well. Again, too bad for Safari, but since this doesn't break compability or anything else, I just cannot be bothered to fix it...

- Wert