namespace Msp {
namespace Graphics {
-bool is_png(const void *buf, unsigned len)
+bool is_png(const char *buf, unsigned len)
{
- return !png_sig_cmp(reinterpret_cast<png_byte *>(const_cast<void *>(buf)), 0, len);
+ return !png_sig_cmp(reinterpret_cast<png_byte *>(const_cast<char*>(buf)), 0, len);
}
-void load_png(IO::Base &in, Image::Private &priv)
+void load_png(IO::Base &in, Image::Private &priv, const char *, unsigned sig_len)
{
png_struct *png = 0;
png_info *info = 0;
throw bad_image_data(error_info.msg);
png_set_read_fn(png, &in, read);
+ png_set_sig_bytes(png, sig_len);
png_read_info(png, info);
png_uint_32 width;
png_uint_32 height;