[PATCH] D46816: [llvm-rc] Read the Planes/BitCount fields from BITMAPINFOHEADER for icons
Adrian McCarthy via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 14 08:51:50 PDT 2018
amccarth added inline comments.
================
Comment at: tools/llvm-rc/ResourceFileWriter.cpp:929
+ NewHeader.Cursor.Width = OldHeader.Icon.Width;
+ // Each cursor in fact stores two bitmaps, one under another.
+ // Height provided in cursor definition describes the height of the
----------------
Most icons also store two bitmaps (the mask and the "color"). I wonder why this adjustment is needed only for cursors.
================
Comment at: tools/llvm-rc/ResourceFileWriter.cpp:950
+ } else {
+ // A PNG .ico file.
+ // https://blogs.msdn.microsoft.com/oldnewthing/20101022-00/?p=12473
----------------
Is there a more-specific test to make sure this is a PNG icon and nut just a corrupted file? For example, BMPHeader->biCompression should have a special value for PNG.
Repository:
rL LLVM
https://reviews.llvm.org/D46816
More information about the llvm-commits
mailing list