|
-
Mar 29th, 2006, 10:57 AM
#1
[2003] Icon only saved as 16 colors?
I am trying to convert a BMP to an icon, and all goes well, however it is only saved with 16 colors . The method I am using:
VB Code:
Dim MyBMP As New Bitmap(MyPictureBox.Image)
Dim MyIcon As Icon = Icon.FromHandle(MyBMP.GetHicon)
Dim st As System.IO.Stream = New System.IO.FileStream(MyFileName, IO.FileMode.Create)
Dim wr As New System.IO.BinaryWriter(st)
MyIcon.Save(st)
wr.Close()
When testing a JPG with lots of colors as the source image, the resulting Icon is saved with only 16 colors, so the image looks all screwey. Is there a way to go about changing the format to support 16 bit or 32 bit color? Or at least 256? Another method perhaps? I checked the Icon class and there doesnt seem to be much there...
***Note - if you want to test, make sure your original image is 16x16 or 32x32... an attached 32x32 image (of yours truly ) is included in the attachments if you dont feel like making one, as well as the ugly result that shows...
Last edited by gigemboy; Mar 29th, 2006 at 12:17 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|