public Image getImageSync ( String path ) { ImageImpl image = createImage ( false , 0 , 0 , path ) ; try { image . succeed ( load ( path ) ) ; } catch ( Throwable t ) { image . fail ( t ) ; } return image ; }
Synchronously loads and returns an image . The calling thread will block while the image is loaded from disk and decoded . When this call returns the image s width and height will be valid and the image can be immediately converted to a texture and drawn into a canvas .