1 pixel white edge on image top and left...

BlitzMax Forums/BlitzMax Programming/1 pixel white edge on image top and left...

Arowx(Posted 2010) [#1]
Odd issue is anyone else getting this, I'm getting a white line on the left and top edge of a transparent png image?

I think I saw an issue like this raised before, just tried to recreate the issue in a simple example but that failed to reproduce the problem?

At least it proves that it's not the graphics card or the image, so must be something in the way I'm loading this image into max or the graphics settings I'm using?


Midimaster(Posted 2010) [#2]
It sounds, like the image has no transparency in the first line. If in your painting programm white was the backcolor, this would effect, that you see a white line.

Which painting program did you use?

Test inside BlitzMax the pixel of the corner (0,0) and check the Alpha-Channel information in this pixel.


therevills(Posted 2010) [#3]
Hey Arowx,

Try running your image thru DeFringe or Multi-Defringe and see if you still get the border:

http://www.blitzmonkeys.com/index.php?topic=37.0


Arowx(Posted 2010) [#4]
Checked the image after loading at coords [0,0], [1,1] and [5,5] all of which should be transparent and found:

DebugLog:Pixel Format 6
DebugLog:0,0 pixel 00000000
DebugLog:1,1 pixel 00000000
DebugLog:5,5 pixel 00000000

Now there is definitly a white edge as though the UV coords of the texture are being offset the image is 1024x1024 but the problem also appears on smaller images but not all?

I am using Virtual Resolution but there is a 1:1 scaling at the moment and the line also appears at different scales.

In additiona the line appears in OpenGL and Dx drivers, on ATI and Nvidia cards?


GfK(Posted 2010) [#5]
Probably doesn't help as you said its 1024x1024, but I get exactly the same problem if I load an image that isn't x^2.


xlsior(Posted 2010) [#6]
IIRC when using the virtual resolutions, you may need to make your sprites slightly bigger with a small fully transparent border around them to prevent this from happening.


GfK(Posted 2010) [#7]
IIRC when using the virtual resolutions, you may need to make your sprites slightly bigger with a small fully transparent border around them to prevent this from happening.
I'm using virtual resolutions and don't have this issue on any of the four systems I test on. And even if I did, by extending a 1024x1024 image by one pixel on both axes, you're effectively using the same resources as a 2048x2048 image; i.e. 16MB instead of 4MB, so I don't consider that to be a feasible solution anyway.

I'd be double-checking that the image you say is 1024x1024, is actually that size. Also you didn't specify your OS, or which version of DX you're using?


Arowx(Posted 2010) [#8]
The image is circular and has a good few pixels transparent border around it.

1024x1024 in GIMP, and properties under OS.

OS is Vista 64 and 32 bits, ATI and Nvidia cards latest drivers, DX11 on both machines but problem also happens in OpenGL mode!

Using the Grey Alien Game Framework and the problem seems to be limited to the dialogue boxes but they just use DrawImage!?


GfK(Posted 2010) [#9]
Does GAF use any behind-the-scenes image processing that might be borking it?

(I don't know, cos I haven't seen it).


Arowx(Posted 2010) [#10]
Not that I can see has some simple wrapper functions on loading images and uses a Precache occasionally to place the image in vram, what is odd about this is that there must be at least 9 other graphical elments on the screen over a background without a problem but the dialogue images used for setting up players appear with this white edge!

I'll take this over to the frameworks forum and see if anyone else is having this odd issue?


Nate the Great(Posted 2010) [#11]
I remember having all kinds of problems like this with blitz images on an ME machine (probably the terrible graphics card), you wouldnt happen to be using windows ME would you?


therevills(Posted 2010) [#12]
Could you post the image? Ive got GAF and could test it for you?

What version of GAF and BlitzMax are you using?


Arowx(Posted 2010) [#13]
Cheers therevills you got me thinking so I had a look at the original GAF demo and there is a one pixel edge on it's dialogue box, then a bit more digging and ...

TDialogue...
   
   ...

   DrawHighlight%=1 'Guess what this does


DOH! ;o)


therevills(Posted 2010) [#14]
LOL - Yep Ive seen that and turned it off ages ago.... If I remember correctly it took me awhile to find it too...