@@ -33,6 +33,22 @@ namespace IMCodec
3333 IcoDirEntry entry[1 ];
3434 };
3535
36+ struct BitmapInfoHeader
37+ {
38+ uint32_t biSize;
39+ int32_t biWidth;
40+ int32_t biHeight;
41+ uint16_t biPlanes;
42+ uint16_t biBitCount;
43+ uint32_t biCompression;
44+ uint32_t biSizeImage;
45+ int32_t biXPelsPerMeter;
46+ int32_t biYPelsPerMeter;
47+ uint32_t biClrUsed;
48+ uint32_t biClrImportant;
49+ };
50+
51+
3652#pragma pack(pop)
3753
3854 class CodecIcon : public IImagePlugin
@@ -50,17 +66,17 @@ namespace IMCodec
5066 { 0x1599fc40 , 0x58df , 0x4950 , { 0xa4 , 0x9b , 0x28 , 0x80 , 0xe7 , 0x28 , 0xce , 0x0 } }
5167
5268 ,CodecCapabilities::Decode
53- , L " Icon/Cursor Codec"
69+ , LLUTILS_TEXT ( " Icon/Cursor Codec" )
5470 ,
5571 {
5672 {
57- { L " Windows Icon File" }
58- ,{ L " ico" , L " icon" }
73+ { LLUTILS_TEXT ( " Windows Icon File" ) }
74+ ,{ LLUTILS_TEXT ( " ico" ), LLUTILS_TEXT ( " icon" ) }
5975 }
6076 ,
6177 {
62- { L " Windows Cursor File" }
63- ,{ L " cur" }
78+ {LLUTILS_TEXT ( " Windows Cursor File" ) }
79+ ,{ LLUTILS_TEXT ( " cur" ) }
6480 }
6581 }
6682
@@ -121,8 +137,7 @@ namespace IMCodec
121137
122138 auto & currentDescriptor = imageItem->descriptor ;
123139 const IcoDirEntry* currentEntry = (&icoFile->entry )[i];
124-
125- const BITMAPINFOHEADER* bitmapInfo = reinterpret_cast <const BITMAPINFOHEADER*>(baseAddress + currentEntry->offsetData );
140+ const BitmapInfoHeader* bitmapInfo = reinterpret_cast <const BitmapInfoHeader*>(baseAddress + currentEntry->offsetData );
126141 if (bitmapInfo->biSize == 40 )
127142 {
128143 if (bitmapInfo->biCompression != 0 )
@@ -234,7 +249,7 @@ namespace IMCodec
234249 sIsLoading = true ;
235250 static thread_local ImageLoader helper;
236251 ImageResult pngRes = helper.Decode (reinterpret_cast <const std::byte*>(baseAddress + currentEntry->offsetData ), currentEntry->imageDataSize
237- , ImageLoadFlags::None, {}, L " png" , PluginTraverseMode::AnyPlugin, pngImage);
252+ , ImageLoadFlags::None, {}, LLUTILS_TEXT ( " png" ) , PluginTraverseMode::AnyPlugin, pngImage);
238253
239254 if (pngRes == ImageResult::Success)
240255 {
0 commit comments