PNG Artifacts?

BlitzMax Forums/BlitzMax Programming/PNG Artifacts?

Tachyon(Posted 2006) [#1]
I have a weird problem. For over a year I've worked on this one project with no imaging problems. Then, within the last week, I've noticed that BlitzMax is displaying most of my .PNG images with strange artifacts on them...kind of like compression artifacts you see with JPG images, with some color bleeding of the pixels. In some images it's very subtle, in others it is striking.

This is happening in areas of the program that have not been touched for months and so I can't trace it to something I recently changed. Also, the original .pngs look fine in Photoshop, but are "muddy" or full of artifacts when BMax draws them to the screen.

I've tried a dozen possible solutions...changing the parameters when I load the .png, changing the blend mode when I draw the .png...nothing has helped. The problems seem to go away if I resave the .png as a .bmp and load that into BMax, but then I loose my alpha channel.

Perhaps this is a hardware issue...maybe my video card dying?? Has anyone else ever experienced anything like this?


Dreamora(Posted 2006) [#2]
with version 1.12 (or 1.10?) the IMAGEFILTERED flag has been introduced. You need to apply it on loading. This flag i used when images are scaled up (drawn larger than they are) or if they are rotated.


Tachyon(Posted 2006) [#3]
Yes, I know about the IMAGEFILTERED flag. Toying with it didn't fix it.

I am about 99% sure this is a driver issue with my video card. Switching my code to OpenGL fixed the problems...I think my recently updated ATI Device Driver might be the culprit. I am going to remove it and try again.

I appreciate your help Dreamora.


Dreamora(Posted 2006) [#4]
Another idea might be that you set your driver to maximum speed for DirectX but did not set OpenGL down that far. This theoretically can lead to similar issues. (thats why I don't install the ATI .NET control center at all. large performance hogg with no use. Use ATI Tray Tools instead with its performance based profiles :) )


Tachyon(Posted 2006) [#5]
Oh man, that was it. I had tweaked some settings on the video card last week. Setting everything back to default fixed my problem.


MrCredo(Posted 2006) [#6]
du you have 32bit depth in full screen?


ImaginaryHuman(Posted 2006) [#7]
It wouldn't be in any way related to compression artefacts as PNG doesn't do any kind of lossy compression. The data is perfectly preserved. It's a display issue.