How do we free our loaded image? Like FreeImage() in B+
Actually I try to create a program to rescale all my JPG file in my computer into half size. So I have to load it, rescale, save it and free it. Then I do for the next one until all finish. This is a half way work..
Without FreeImage() the memory is full!!!?!?!?!
So I rem it for a while until I found a solution
Actually I try to create a program to rescale all my JPG file in my computer into half size. So I have to load it, rescale, save it and free it. Then I do for the next one until all finish. This is a half way work..
'Graphics 800,600 diro$="C:" into(diro$) Function into(diro$) dir=ReadDir(diro$) Repeat t$=NextFile( dir ) If t="" Exit If t="." Or t=".." Continue If FileType(diro$+t)=2 into(diro$+t+"/") EndIf If Upper(Right(t,3))="JPG" print diro$+t 'temp=LoadImage(diro$+t) 'If temp ' DrawImage temp,0,0 ' Flip ' Delay 2000 ' ProcessRescale() ' FreeImage(temp) 'EndIf EndIf Forever CloseDir dir End Function function ProcessRescale() end function
Without FreeImage() the memory is full!!!?!?!?!
So I rem it for a while until I found a solution