DeleteImageRange
DeleteImageRange StartingImageNumber, EndingImageNumber
 
Parameters:

    StartingImageNumber = The Starting image number of the range you wish to delete
    EndingImageNumber = The ending image number of the range you wish to delete
Returns: NONE
 

      DeleteImageRange will run through a range of images indexes and proceed to free any images within this range that are in use.



FACTS:


      * Attempting to delete an Image that is not currently in use, will produce an error. See: GetImageStatus

      * Once an image has been deleted from the memory, there is no way to retrieve it without loading it recreating a new version.




Mini Tutorial:


      A small example to create 10 images between Image Indexes 1 and 10, then delete the top half of them.

  
  
; Create 10 images of random size.
  For ThisImg=1 To 10
     CreateImage ThisIMG,RndRange(10,100),RndRange(10,100)
  Next
  
; Display the Status of each image.  A 1 means this image is in use, a zero means it's free to be used
  Print "The Status of Images 1 to 10:"
  For ThisImg=1 To 10
     Print "Image:"+Str$(ThisImg)+" Status:"+Str$(GetImageStatus(ThisImg))
  Next ThisIMG
  
; Delete Images 5 to 10  from memory
  DeleteImageRange 5,10
  
  Print "The Status of Images 1 to 10 after Images 5,6,7,8,9 and 10 have been deleted:"
  For ThisImg=1 To 10
     Print "Image:"+Str$(ThisImg)+" Status:"+Str$(GetImageStatus(ThisImg))
  Next ThisIMG
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  




This example would output.

  
The Status of Images 1 To 10:
  Image:1 Status:1
  Image:2 Status:1
  Image:3 Status:1
  Image:4 Status:1
  Image:5 Status:1
  Image:6 Status:1
  Image:7 Status:1
  Image:8 Status:1
  Image:9 Status:1
  Image:10 Status:1
The Status of Images 1 To 10 after Images 5,6,7,8,9 And 10 have been deleted:
  Image:1 Status:1
  Image:2 Status:1
  Image:3 Status:1
  Image:4 Status:1
  Image:5 Status:0
  Image:6 Status:0
  Image:7 Status:0
  Image:8 Status:0
  Image:9 Status:0
  Image:10 Status:0
  

 
Related Info: CreateFxImage | CreateImage | DeleteAllImages | DeleteImage | LoadImage | NewFxImage | NewImage :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com