-
Notifications
You must be signed in to change notification settings - Fork 441
Description
For at least some bitmap ICO files, the ICO files output by RemoteApp Tool appear to have the wrong height in the ICONDIRENTRY height bit.
Bitmap ICO files actually contain a bitmap with a height that is twice the height of the icon because the bitmap contains the icon data in the first veritical half, and the second vertical half is a mask indicating which pixels from the bitmap to draw (this allows icons with transparent pixels). The ICONDIRENTRY height bit must be half the height of the bitmap so that the icon has a declared square width.
Some icon viewers can handle when the ICO file's height bit is wrong. Browsers fail to load the ico when the height bit is wrong. This is problematic when the ICO file is used in applications such as RAWeb.
I was able to confirm this behavior with WakeMeOnLan's exe, but there are some additional examples at kimmknight/raweb#69.
I don't have a full understanding of the way RemoteApp Tool works, but it looks like it is using ExtractIconEx from shell32.dll, just like RAWeb. The implimentation in RAWeb converts the icons to PNG before serving the to the browser, so that may be a potential solution.