-
-
Save hellboy81/1d111e260a897db79aa1 to your computer and use it in GitHub Desktop.
In WinCE device should always 24 bit images used?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// image : 32 Bit | |
image.GetImageInfo(out imageInfo); | |
// imageInfo.PixelFormat = PixelFormat.Format32bppRgb detected | |
// Without this line thumbnail is black image | |
imageInfo.PixelFormat = PixelFormat.Format24bppRgb; | |
// http://msdn.microsoft.com/en-us/library/aa452205.aspx | |
// A PixelFormatID value that specifies the numerical format of the pixels in the image. | |
// For more information, see PixelFormat Values. | |
// Set this value to PixelFormatDontCare to create a new bitmap image that has the same pixel format as the source image. | |
IImagingFactory.CreateBitmapFromImage(image, (uint)width, (uint)height, | |
imageInfo.PixelFormat, InterpolationHint.InterpolationHintDefault, out thumbnail); | |
// thumbnail is now correct both for 24-Bit and 32-Bit images |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment