Skip to main content
gamedev.net
🔒 Locked

JPEG - Color problems

Started by McMcDonald 2 replies 300+ views
Original Post
McMcDonald
McMcDonald
Hi! There was no answer in the "visual arts" forum - so i will try it at "Game programming": I am using directx7. I load my .bmp-graphics - all works well. But if i load the same graphics (using NViewLib.dll) as .jpg, it seems that black (my colorkey) is not really black. For example around yellow colors there are a lot of pixels that appears not transparent. I use Adobe photoshop to save the .bmp as .jpg (highest quality). Any ideas? It would be nice to use .jpg to get a downloadable game. Thanks McMc
OmniBrain
OmniBrain
I am pretty sure the problem is solved if you don''t use a single color for transparency, but a color-range.

If you use BMPs, the right color for each Pixel is stored, but if you use JPGs compression, it will only store "A color close to the one you wanted". So a JPG black isn''t the same black at all places.
Your eye can''t differ a RGB 0-0-0 black from a 0-1-1 black, but for transperency it does differ.

Hope this helps.
-----The scheduled downtime is omitted cause of technical problems.
burp
burp
You need to use a lossless compression format.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.