Masking Scaled Images

Blitz3D Forums/Blitz3D Beginners Area/Masking Scaled Images

Cousin Gilgamesh(Posted 2006) [#1]
I know this has to have been covered somewhere before, but I just can't find it. So anyway. I load the images for my GUI and then mask them and scale them to the appropriate size for the particular screen resolution, but whenever I scale the images, the masking is messy. take a look.

Graphics 640, 480

Global lArrow = LoadImage("lArrow.bmp")
MaskImage lArrow, 255, 255, 255
ScaleImage larrow, 1.5, 1.5

ClsColor 0, 200, 200
Cls

DrawImage lArrow, 200, 200

While Not KeyHit(1)
	
Wend


Is there any way to get effective image masking and scaling at the same time?


big10p(Posted 2006) [#2]
You need to put "TFormFilter False" before scaling the image. It disables bi-linear filtering, which is what is screwing up your masking.


Cousin Gilgamesh(Posted 2006) [#3]
Works like a charm, thanks!


Sir Gak(Posted 2006) [#4]
big10p: nice answer!


big10p(Posted 2006) [#5]
Er, thanks. :)