support loading an icon from memory only on Windows (for now)
This commit is contained in:
parent
e7620ecaeb
commit
7fcbcc1ff2
@ -358,10 +358,13 @@ namespace paint
|
||||
else if (bytes > 9 && (0x66697845 == *reinterpret_cast<const unsigned*>(reinterpret_cast<const char*>(data)+5))) //Exif
|
||||
ptr = std::make_shared<detail::image_jpeg>();
|
||||
#endif
|
||||
|
||||
#if defined(NANA_WINDOWS)
|
||||
// suppose icon data is bitmap data
|
||||
if (!ptr && bytes > 40 /* sizeof(BITMAPINFOHEADER) */ && (40 == *reinterpret_cast<const uint32_t*>(data))) {
|
||||
ptr = std::make_shared<detail::image_ico>(true);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user