return TRUE;
}
-#endif
- // wxUSE_STREAMS
-#endif
- // wxUSE_LIBJPEG
+bool wxJPEGHandler::CanRead( wxInputStream& stream )
+{
+ unsigned char hdr[2];
+
+ stream.Read(&hdr, 2);
+ stream.SeekI(-2, wxFromCurrent);
+ return (hdr[0] == 0xFF && hdr[1] == 0xD8);
+}
+
+#endif // wxUSE_STREAMS
+
+#endif // wxUSE_LIBJPEG