C# - Icons erstellen

kasal

Erfahrenes Mitglied
Hallo Freunde!

Gibt es in C# eine Möglichkeit Icons aus Bitmaps zu erstellen, also sozusagen von Bitmap in Icon umwandeln?

Habe dazu bisher leider nichts gefunden..

Danke schonmal!


Lg,
kasal
 
Hi Kasal!

Probier's mal so:

csharp Code:
C#:
// Rudimentäres Bitmap to Icon Beispiel
Icon icon = null;
Bitmap bitmap = new Bitmap(16,16);

using ( Stream stream = new MemoryStream() ){
	bitmap.Save( stream, ImageFormat.Icon);
	icon = new Icon( stream );
}
Jetzt solltest ein Icon haben. :)

MfG,
cosmo
 
Zurück