Found this out today.
Well, normally if you load an image and don't specify any flags, it will use AutoImageFlags which (unless you've changed them) are MASKEDIMAGE and FILTEREDIMAGE. This is normally fine as you want your sprite to be masked and filtered image means that if it's scaled up, rotated or drawn at fractional pixel sizes it looks cool (antialiased).
However, if you load in a background image with these flags that has a lot of black in (I had a jpg like this), it may not have the desired effect. My jpg was black with white writing (which was anti-aliased in a paint package) and although the edges of text were fine in the paint package, it looked weird and jagged in BlitzMax. I assume this is because the defaul mask colour is not using plain 0,0,0, it's actually using a range e.g. 8,8,8 or something and cutting those colours out. Anyone have more info on this...? (I can post an example)
Anyway, so I recommend always loading background images with a flag of 0, unless you plan to rotate or scale or scroll (draw at floating point coords) the background.
Also, am I correct in thinking that filtered images take up more memory or is that just mipmapped images? Also are filtered images slower to draw, even at integer coords, non-scaled and non-rotated?
Well, normally if you load an image and don't specify any flags, it will use AutoImageFlags which (unless you've changed them) are MASKEDIMAGE and FILTEREDIMAGE. This is normally fine as you want your sprite to be masked and filtered image means that if it's scaled up, rotated or drawn at fractional pixel sizes it looks cool (antialiased).
However, if you load in a background image with these flags that has a lot of black in (I had a jpg like this), it may not have the desired effect. My jpg was black with white writing (which was anti-aliased in a paint package) and although the edges of text were fine in the paint package, it looked weird and jagged in BlitzMax. I assume this is because the defaul mask colour is not using plain 0,0,0, it's actually using a range e.g. 8,8,8 or something and cutting those colours out. Anyone have more info on this...? (I can post an example)
Anyway, so I recommend always loading background images with a flag of 0, unless you plan to rotate or scale or scroll (draw at floating point coords) the background.
Also, am I correct in thinking that filtered images take up more memory or is that just mipmapped images? Also are filtered images slower to draw, even at integer coords, non-scaled and non-rotated?