-void Image::load_file(const string &fn)
-{
- string ext = FS::extpart(fn);
-#ifdef WITH_LIBPNG
- if(ext==".png")
- {
- IO::BufferedFile file(fn);
- load_png(file, *priv, 0, 0);
- }
- else
-#endif
- {
-#ifdef WITH_DEVIL
- load_devil_file(fn, *priv);
-#else
- throw unsupported_image_format("DevIL needed for non-PNG images");
-#endif
- }
- (void)fn;
-}