From 7fcbcc1ff2d4aa366e733428451ca2de723d85f4 Mon Sep 17 00:00:00 2001 From: beru Date: Mon, 20 Jun 2016 14:24:15 +0900 Subject: [PATCH] support loading an icon from memory only on Windows (for now) --- source/paint/image.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/paint/image.cpp b/source/paint/image.cpp index 800a9aab..1f6a8563 100644 --- a/source/paint/image.cpp +++ b/source/paint/image.cpp @@ -358,10 +358,13 @@ namespace paint else if (bytes > 9 && (0x66697845 == *reinterpret_cast(reinterpret_cast(data)+5))) //Exif ptr = std::make_shared(); #endif + +#if defined(NANA_WINDOWS) // suppose icon data is bitmap data if (!ptr && bytes > 40 /* sizeof(BITMAPINFOHEADER) */ && (40 == *reinterpret_cast(data))) { ptr = std::make_shared(true); } +#endif } }