Currently on the Windows platform, window icons must either be a .ico file, a ICO encoded buffer or a resource icon.
To me, this doesn't make much sense, as the Win32 API easily supports creating icons on the fly straight from pixel data.
So in this PR I added support for creating icons directly from the pixel data stored in nana::paint::image.
The point of this is that now one can easily set any bmp, png or jpeg (provided png and jpeg are enabled, respectively) as icons as well.
On that note I also wanted to say that the pixel buffer can be quite difficult to get pixel data from. Maybe the API could be improved in that regard.
Currently on the Windows platform, window icons must either be a .ico file, a ICO encoded buffer or a resource icon.
To me, this doesn't make much sense, as the Win32 API easily supports creating icons on the fly straight from pixel data.
So in this PR I added support for creating icons directly from the pixel data stored in
nana::paint::image
. The point of this is that now one can easily set any bmp, png or jpeg (provided png and jpeg are enabled, respectively) as icons as well.On that note I also wanted to say that the pixel buffer can be quite difficult to get pixel data from. Maybe the API could be improved in that regard.