- char sig_buf[8];
- unsigned sig_len = io.read(sig_buf, sizeof(sig_buf));
-#ifdef WITH_LIBPNG
- if(sig_len==sizeof(sig_buf) && is_png(sig_buf, sig_len))
- load_png(io, *priv, sig_buf, sig_len);
- else
-#endif
- {
-#ifdef WITH_DEVIL
- load_devil_io(io, *priv, sig_buf, sig_len);
-#else
- throw unsupported_image_format("DevIL needed for non-PNG images");
-#endif
- }