Image to ICO
-
I am trying to convert a picturebox into an ICO. I found out that it is a known bug that the ImageFormat.Icon does not encode the image correctly. Using this article: http://www.codeproject.com/dotnet/MultiIcon.asp I know how to encode the icon, the only problem is, that I need to get the image's raw bytes to write to the image. Does anybody have any idea how to do this or a better way to convert an image or png to an ico? JGA
-
I am trying to convert a picturebox into an ICO. I found out that it is a known bug that the ImageFormat.Icon does not encode the image correctly. Using this article: http://www.codeproject.com/dotnet/MultiIcon.asp I know how to encode the icon, the only problem is, that I need to get the image's raw bytes to write to the image. Does anybody have any idea how to do this or a better way to convert an image or png to an ico? JGA
-
enjoycrack wrote:
You might take a look on this article to get the solution Icon
here's are the problems with that article: The source Bitmap must use PixelFormat.Format24BppRgb The source Bitmap must use at most 256 colors The source Bitmap must be 16x16 pixels The target Icon must be 16x16 pixels The pixel in the lower left corner (0, 15) is used to determine the transparency color JGA