Image display in aspect2d shows artifact

Hi,

I’ve created an egg-file for an image with:

egg-texture-cards -p 177,55 -o test.egg MenuMainTitle.png

The image is 354x110 pixels big, so I took the half of that for the -p parameter. It looks like:

Now when I show this image with:

        test= loader.loadModel('gui/menu/test.egg')
        title= DirectLabel(geom= test.find('**/MenuMainTitle'),
                                relief= None)

a white line at the bottom of the image is displayed although obviously not existent in the actual image. Here’s a screenshot:

The image does have an alpha channel, if that’s of any importance - the alpha is generally correctly used, though.

Any ideas why this is happening or what I can do against it?

Many thanks,

Max Hajek
Vienna, Austria

Note that the scaling isn’t correct either. Now I’ve got a solution for that (using the scale keyword and calculating the right dimensions from the pixels myself), but why is this necessary? My understanding of your explanations in other posts was that with -p I setup the correct scaling directly in the egg file.

OTOH, this is of secondary priority as I got a functinal workaround for it. The artifact problem, though, is a real show-stopper (also because this is not the only image with which this occurs).

Cheers and thanks for all your work,

Max Hajek
Vienna, Austria

Btw, I tried to replace the use of DirectLabel with Onscreenimage and the same phenomenon happens.

Note that -p does not specify the size in pixels of your card. It specifies the size in pixels of a standard square on the screen. Normally, the two parameters of p are the same, and they are normally 1/2 the height of the screen in pixels. Thus, try something like “-p 300,300” to fix the strange scaling.

As to the line at the bottom, that’s a wraparound from the top of the texture. To avoid this, use “-wm clamp”.

David

Thanks, the -wm clamp option solves my problem just perfectly.

Thank you as always for your great work.

Max