Oddities with loadimage flags?

BlitzMax Forums/BlitzMax Programming/Oddities with loadimage flags?

Arowx(Posted 2010) [#1]
Found an odd problem with png graphics and loadimage flags...

If I set the loadimage flag to -1 most of the graphics look good, but two parallel lines (white lines on gray background) in one image now look like they are at an angle?

In GIMP they are in fact two horizontal parallel lines two pixel wide with very light shading around them (antialising from export from vector art packaage).

Now if I play with the loadimage flags I can get the lines to look great using FILTEREDIMAGE but now I get a dark gray border around the grey circle that surrounds the lines?

I have tried a variety of image flags without any success I can have a transparent outline around the circle and skewed lines or straight lines and a dark sketchy outline around the circles.

I'm just using the default windowed graphics command:

Graphics width, height.
and ALPHABLEND as the blend mode.


Arowx(Posted 2010) [#2]
Update using the openGl driver and it works fine with a flag of 0, DX7 and DX9 seem to result in the skewed lines...

I've grabbed the screen image and the parellel 3 pixel wide white lines on a gray background look as thought they have been slightly skewed or rotated.

And that's after cleaned up the graphic to exclude the minor shading around the lines!

Note: that I have not applied any scaling or rotation to the images.


TaskMaster(Posted 2010) [#3]
Is the actual image a power of 2 size dimensions? Like 16x32 or 64x64 or something like that?

If not, BM scales the image when drawing it, and it could cause a small image to appear strange.


Arowx(Posted 2010) [#4]
Cheers TaskMaster going to power of two sorted the parallel lines out!

I can get around the outlines as long as I only use certain flags.