You must be Mr McVague.
Why? Why not skip that step and create a pixmap in the format you want and a placeholder for the image...
or do you mean you load an image?
Start your loop and do your memcopy (or whatever) it is you need to do...
then load you pixmap into an image. Not sure why you think that bit is complicated as it's simply...
Now scale your image and draw it...
Anyway, this *might* be what you're after but who knows...
So I need to create a TImage once
Why? Why not skip that step and create a pixmap in the format you want and a placeholder for the image...
graphics 640,480 local mypix:TPixmap=createpixmap(200,200,PF_BGR888) local image:TImage
or do you mean you load an image?
Start your loop and do your memcopy (or whatever) it is you need to do...
while not keyhit(key_escape) cls 'memcopy stuff
then load you pixmap into an image. Not sure why you think that bit is complicated as it's simply...
image=loadimage(pix)
Now scale your image and draw it...
setscale 2.0,2.0 drawimage image,0,0 flip wend
Anyway, this *might* be what you're after but who knows...
Graphics 640,480 SeedRnd MilliSecs() ' load an image. If it's not a specific image then just use... ' Pix=createpixmap(width,height,format) ' that means you can miss the convert step image:Timage=LoadImage("max.png") pix:TPixmap=LockImage(image) pix=ConvertPixmap(pix,PF_BGR888) While Not KeyHit(key_escape) Cls ' This is a substitution for your memcopy bit. For x = 1 To 30 WritePixel(pix,Rand(0,pix.width-1),Rand(0,pix.height-1),-65536) Next 'load the pixmap into an image (not hard) image=LoadImage(pix) ' change the drawscale SetScale 2.0,2.0 ' draw the image DrawImage image,0,0 Flip Wend