Loading images to be called by the data of a value

BlitzPlus Forums/BlitzPlus Beginners Area/Loading images to be called by the data of a value

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Here's what I want
Global outimg$
	Function rotateimg(imgfile$,outimg$)
		tempOutImgStore$=outimg$       ; loads the data of outimg$ into a temporary variable
		tempImg1 = LoadImage(imgfile$) ;makes an image out of the imgfile$ variable
		For i = 0 To 360
			tempImg2 = CopyImage(tempImg1) ;copy the image
			RotateImage(tempImg2,i) ;rotate it
			tempOutImgStore$ = tempOutImgStore$+i ;add the current direction to the tempOutImgStore variable

			tempOutImgStore$ = CopyImage(tempImg2) ;copies the rotated image to the newly defined tempOutImgStore variable 

Directly above is my problem - I need the data defined (the text of tempOutImg) to be the 'handle' for the image.
			DebugLog "Created "+tempOutImgStore$
			tempOutImgStore=outimg$
		Next
	End Function
Graphics 90,90
	
rotateimg("thisimage.png","rotatedimage")	
DrawImage rotatedimage55,45,45 ;draws the image rotatedimage55- the rotated image at 55 degrees.
Flip
WaitKey()
End