PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
Creating Image files - Prolem with Icons
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
Creating Image files - Prolem with Icons
![]() |
Creating Image files - Prolem with Icons |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
(Also posted on Drawing)
I created a drawing program using VS.NET 2003. I use GDI+ for the graphics. I also wanted the option of creating Image files using the same painting software. Here is what I do: // Create bitmap Bitmap bmp = new Bitmap(32, 32) // Get a graphics object Graphics g = Graphics.FromImage(bmp); // Create the drawing on the bitmap DrawOnBitmap(g, ......); // Save the image to disk bmp.Save(FileName, imgfmt); where imgfmt is an ImageFormat property. All the following work: Bmp, Emf, Gif, Jpeg, Png, Tiff, Wnf. However, when I try to use ImageFormat.Icon, the file gets created by isn't recognized by VS.NET and is brought up in a VS hex editor. I compared this file with one supplied with the system and noticed a significant difference in file size. Mine was 192 bytes whereas the system supplied ico file was 1078 bytes. Any ideas greatly appreciated. Bob Costello |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

