Re: Loading A Graphic Using CxImage From User Input
- Posted by mic_ Jun 23, 2009
- 1331 views
Doesn't seem like such a good idea to load the image every time there's a Paint event. Even if you free the previously loaded image before loading the new one, there's no point in re-loading it unless the filename has changed.
Also, what's the point of 'buffer'? You're reading the entire file into a sequence.. then what?
And shouldn't this:
HeroWalk_Gfx = CXI_LoadImage(file,GraphicType,0)
really be this:
HeroWalk_Gfx = CXI_LoadImage(fName,GraphicType,0)
..?