Jump to content

Darkening images in html. Why?


shlorpaderp

Recommended Posts

I can't find an answer for this problem and it's starting to seriously annoy me.

Any PNG image I link to my html is noticeably darker/sharper/more contrasted than its source.

Images attached to post, context and code below, too.

I created a BLANK html page and added one single image to test it out. The images with cats differ in that the HTML version (bottom) is clearly sharper (if you look closer at the fur) compared to its source file, while the png image of a green diamond on a dark grey background that I myself made is much lighter in the source, compared to its browser child - look at the black dot I painted for comparison, one is pretty visible, while the one on the right is practically camouflaged in its own background.

Here are the lines I used for the diamond, the same for the cat (just a different source:

<!DOCTYPE html>
<html>

<head>
	<title>Test</title>
</head>

<body>
	<img src="images/diamond.png" class="diamond">
</body>
</html>

This is important to me, because my website is primarily image-driven, and if all the images are darker than my actual products, it might cause me trouble.

 

Browsers used: Latest versions of Chrome and Firefox

cats.png

diamond what.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...