[SOLVED] Issue - Image faded view, only in browser

In some cases, the images will appear properly in "image viewer" software, but in browser it will appear with the faded effect.
For Ex:
Pic1 - Image comparision
The Pic1 shows the same image file with different appearance in browser and the image viewer software.

The image file's meta data missed the color Profile. So, the PC will automatically apply the sRGB profile. But, the browser can not apply the color profile by default (Except Internet Explorer).

We've to embed the color profile to the file.

It is possible by ImageMagick shell script.

Step #1:
Download the expected color profile from the link.

Step #2:
Save the color profile in your system (Ex.: /opt/tmp/sRGB_v4_ICC_preference_displayclass.icc)

Step #3:
Execute the following shell command in the terminal

convert <filename> -profile /opt/tmp/sRGB_v4_ICC_preference_displayclass.icc <destination>

For example
convert /opt/tmp/umbrella.jpg -profile /opt/tmp/sRGB_v4_ICC_preference_displayclass.icc /opt/tmp/umbrellaSrgb.jpg

Now the file will be open with the same appearance in browser and the image viewer.

Click here to Download the example file

Popular posts from this blog

[Solved] Hive installation error: java.net.URISyntaxException: Relative path in absolute URI

Install Android SDK in centOs

ATG Issue - ConcurrentUpdateException - on BCC Deployment