I use something like this but with wrappers around the images like Vilu. You should never call LoadImage more than you need to is I think the short answer.
Type TimageLibrary Extends Tmap Method get:Timage(path:String) Local o:Object = MapValueForKey(Self, path) If TImage(o) Return TImage(o) EndMethod Method open(path:String, frames:Int = 1) Local i:Timage If frames > 1 Local temp:Timage = LoadImage(path) Local w:Int = ImageWidth(temp) Local h:Int = ImageHeight(temp) i = LoadAnimImage(path, w / frames, h, 0, frames) Else i = LoadImage(path) EndIf MapInsert(Self, path, i) EndMethod Method list:TMapEnumerator() Return MapKeys:TMapEnumerator( Self ) EndMethod EndType