Resize texture ?

Blitz3D Forums/Blitz3D Programming/Resize texture ?

Hi

Is there a way to resize a loaded or created
texture in pixel unit ?

Regards

ScaleTexture Texture,x,y,z

Thanks olive :) but i want scale texture in pixel mode like scaleimage.

this will work, however its not intended for real time use.
Function resizetexture(tex,xs,ys,flags=0)
 oldx=TextureWidth(tex)
 oldy=TextureHeight(tex)
 temptex=CreateImage(oldx,oldy)
 CopyRect 0,0,oldx,oldy,0,0,TextureBuffer(tex),ImageBuffer(temptex)
 ResizeImage temptex,xs,ys
 newx=ImageWidth(temptex)
 newy=ImageHeight(temptex)
 FreeTexture tex
 If flags=0 Then 
  tex=CreateTexture(xs,ys)
  CopyRect 0,0,newx,newy,0,0,ImageBuffer(temptex),TextureBuffer(tex)
  FreeImage temptex
  Else
  SaveImage temptex,"temptex.bmp"
  tex=LoadTexture("temptex.bmp",flags)
 EndIf
 FreeImage temptex
 Return tex
End Function

Function ScaleTexture2(tex,xs#,ys#,flags=0)
 oldx=TextureWidth(tex)
 oldy=TextureHeight(tex)
 temptex=CreateImage(oldx,oldy)
 CopyRect 0,0,oldx,oldy,0,0,TextureBuffer(tex),ImageBuffer(temptex)
 ScaleImage temptex,xs,ys
 newx=ImageWidth(temptex)
 newy=ImageHeight(temptex)
 FreeTexture tex
 If flags=0 Then 
  tex=CreateTexture(newx,newy)
  CopyRect 0,0,newx,newy,0,0,ImageBuffer(temptex),TextureBuffer(tex)
  FreeImage temptex
  Else
  SaveImage temptex,"temptex.bmp"
  tex=LoadTexture("temptex.bmp",flags)
 EndIf
 FreeImage temptex
 Return tex
End Function


Many thanks !!!