How can I create an Icon object that contains multiple sizes? I cannot load it from a resource because the content is created from different overlayed bitmaps. I cannot create a .ico file because the bitmaps are generated at runtime.
I have 4 Bitmap objects (16×16, 32×32, 64×64 and 128×128). I want to combine these 4 Bitmaps into a single Icon object.
To create an Icon object with multiple sizes you need an ico file or a stream of a ico file. This C# sample code of an IconFactory show how you can create such stream form multiple images in C#. It should be easy to change this sample to use Bitmap objects instead of the BufferedImage objects.