This adds ability to output cursors and icons as resources.
Unfortunately, we can't just copy .cur or .ico files to output - as each file might contain multiple images, each of them needs to be unpacked and stored as a separate resource. This forces us to parse cursor and icon contents. (Fortunately, these formats are pretty similar and can be processed by mostly common code).
As test files are binary, here is a short explanation of .cur and .ico files stored:
- cursor.cur, cursor-8.cur, cursor-32.cur are sample correct cursor files, differing in their bit depth.
- icon-old.ico, icon-new.ico are sample correct icon files;
- icon-png.ico is a sample correct icon file in PNG format (instead of usual BMP);
- cursor-eof.cur is an incorrect cursor file - this is cursor.cur with some of its final bytes removed.
- cursor-bad-offset.cur is an incorrect cursor file - image header states that image data begins at offset 0xFFFFFFFF.
Sample correct cursors and icons were created by Nico Weber.