protected void load(char[] filename) { // Attempt to load image source = Resource.resolvePath(filename); Log.write("Loading image '" ~ source ~ "'."); SDL_Surface *sdl_image; if ((sdl_image = IMG_Load(toStringz(source))) is null){ throw new Exception("Could not open image file '" ~ source ~ "'."); } width = sdl_image.w; height= sdl_image.h;