Same image displaying differently in different browsers - image

Here is an image:
When I load this image in different browsers, it shows differently.
Take a look at the result:
I spent a lot of time on this, but I can't understand why it happens.
I have only theories: something wrong with color profiles, or bad image structure, or something else - maybe special copyright measures?
Why is this happening?

The image is a CMYK image, which IE and Safari apparently do not support. Converting it into an RGB image solved the problem for both Safari and IE.
RGB Version:
The color's been changed though, so you'd probably want to run it through Photoshop and edit the color balance to get the colors right.

There could be something wrong with the image. Open it in some image editor like GIMP and check if it gives some warnings. Try converting the image to some other format(png?) and see if the browsers render it correctly.

Related

Sprite PNG is appearing distorted

We are using a png/8 sprite on a client's website. He is reporting the image is appearing distorted for him and on other computers on the company.
Here's how it should look:
http://i.imgur.com/wfV7ReR.jpg
And here is the print screen the client sent us:
http://i.imgur.com/sWKDYKU.jpg
I have tried donloading and exporting it again, uploading again. The problem is: On our computers it looks fine, so it's hard to test it. Our client is viewing it in IE: 11 and Google chrome: 41.0.272.118.
Has anyone seen this type of error before?
It may be the device-pixel-ratio is better than 160dpi; that'd throw off some CSS used for spriting.
If this shows "1" for you and a different value for them, I'd dig farther on that one. You could probably test this by hitting the site with an iPhone or newer Android device; they have >1.0 pixel ratios.
http://www.devicepixelratio.com/
Edit: this would also show up across-browsers on their end, as it's tied to the hardware, and not IE11.
My bet in that case is the PNG is somehow broken.
graphicdesign.stackexchange.com might be more useful; I don't know if this is fixable in CSS. (Might be; look for hacks around image backgrounds as well.)
Looking around, if you have Photoshop, you might try saving the original image, then creating a copy and changing this setting:
Image -> Mode -> Check "RGB Color"
Alternatively, try opening the image in pixlr.com, change anything however slightly, then save and use that one.
My strong suspicion is something in the way the PNG/8 is saved (maybe the alpha channel) is the issue, not any CSS you've written. Good luck!

Firefox displaying image colours incorrectly

I have a website that incorporates a logo in to the header. This logo has a background that is the same colour as the background of the header, yet in Firefox the colour is different.
I can find various articles alluding that the 'colour profile' being the culprit, but I cannot find out how to fix this issue.
Quite why anyone would think that changing the colour of an image is the way forward I don't know, but it looks very poor, so I'd be grateful for some suggestions on how to fix this.
To create the original image I used GIMP, and it has been exported as a PNG.
Here is a section of the header so that you can visually see what I mean -
Since you do not provide the original image, I have to make an educated guess:
Your image most likely has a (broken, incorrect) color profile embedded. Fix or remove the color profile and you should be good. See the documentation of your favorite tool on how to do that.
You should use some tool like tweakpng to check if the PNG has a color profile, and remove it.

Large images don't render in Chrome?

Very large images will not render in Google Chrome (although the scrollbars will still behave as if the image is present). The same images will often render just fine in other browsers.
Here are two sample images. If you're using Google Chrome, you won't see the long red bar:
Short Blue
http://i.stack.imgur.com/ApGfg.png
Long Red
http://i.stack.imgur.com/J2eRf.png
As you can see, the browser thinks the longer image is there, but it simply doesn't render. The image format doesn't seem to matter either: I've tried both PNGs and JPEGs. I've also tested this on two different machines running different operating systems (Windows and OSX). This is obviously a bug, but can anyone think of a workaround that would force Chrome to render large images?
Not that anyone cares or is even looking at this post, but I did find an odd workaround. The problem seems to be with the way Chrome handles zooming. If you set the zoom property to 98.6% and lower or 102.6% and higher, the image will render (setting the zoom property to any value between 98.6% and 102.6% will cause the rendering to fail). Note that the zoom property is not officially defined in CSS, so some browsers may ignore it (which is a good thing in this case since this is a browser-specific hack). As long as you don't mind the image being resized slightly, I suppose this may be the best fix.
In short, the following code produces the desired result, as shown here:
<img style="zoom:98.6%" src="http://i.stack.imgur.com/J2eRf.png">
Update:
Actually, this is a good opportunity to kill two birds with one stone. As screens move to higher resolutions (e.g. the Apple Retina display), web developers will want to start serving up images that are twice as large and then scaling them down by 50%, as suggested here. So, instead of using the zoom property as suggested above, you could simply double the size of the image and render it at half the size:
<img style="width:50%;height:50%;" src="http://i.stack.imgur.com/J2eRf.png">
Not only will this solve your rendering problem in Chrome, but it will make the image look nice and crisp on the next generation of high-resolution displays.

Mysterious PNG RGB+Alpha image that works with IE6

http://moztw.org/images/product-front-thunderbird.png
I am sure that this is a PNG image in RGB colors and a alpha channel (look at the shadow below the icon), but this file mysteriously works with IE6 w/o any special CSS hack (though it seems the alpha channel is being replaced by 2-bit mask in IE6).
Can anyone tell me exactly what information is in the file? It would be even better if someone could give a guidance on how to create such file. Thanks.
Edit: Friends at moztw.org added script hack to the website, so the above statement is no longer verifiable. But your are still welcome to investigate the image format.
That's PNG8+alpha. Explanation and examples in "PNG that works" article.
You can generate such files with pngquant (on a Mac, ImageAlpha is a GUI for it).

Image resize issue in Mozilla Firefox for windows

I am having some weird issues. I have a large image which is being shrunk to size 30px in the img link so:
img src="/company/images/logos/1.png" height="30px"
On all browsers and computers it looks fine except for firefox on a windows. I found out that when i rid the height constraint it looks fine but when i add the "30px" it looks messed up.
Any ideas on what i might need to do?
I'm guessing you're talking about issue where the default Firefox image resizing algorithm makes the image look "jagged".
In general, it's better to not let the browser resize the image.
You should instead make a version of the image that is already the correct size.
I'm not aware of a way to make the image look good when downscaling in Firefox.
See here for a comparison. (I used Firefox 3.6.15 / Windows 7)
If anybody has a way to make the first image downscale smoothly in Firefox, I'd like to know.

Resources