I have problem with saving bitmap as an .ico file. Standard icon.save reduce color depth from 32 to 4 bpp which destroys good look of my picture. Is there any possibility to change that? I´ve tried bitmap save as imageformat.icon but this return gdi++ error.
this is my code:
Image image = Image.FromFile(previewPath);
Image newImage = image.GetThumbnailImage(256, 256, null, new IntPtr());
Stream IconStream = System.IO.File.OpenWrite(iconPath);
Bitmap bitmap = new Bitmap(newImage);
Icon icon = System.Drawing.Icon.FromHandle(bitmap.GetHicon());
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)