Visual Basic (Declaration) | |
---|---|
Public Sub MakeGdiPlusCompatible( _ ByVal pixelFormat As PixelFormat, _ ByVal noPalette As Boolean _ ) |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public void MakeGdiPlusCompatible( PixelFormat pixelFormat, bool noPalette ) |
C++/CLI | |
---|---|
public: void MakeGdiPlusCompatible( PixelFormat pixelFormat, bool noPalette ) |
Parameters
- pixelFormat
- The pixel format to use.
- noPalette
- Fail if the image is palettized.
For an example, refer to ConvertToGdiPlusImage
Pass DontCare to the pixelFormat parameter to have the method choose the appropriate pixel format.
For a RasterImage to be compatible with a GDI+ image it needs the following:
IsConventionalMemory to be true (Tiled, compressed and disk-based images are not supported) BitsPerPixel value of 1, 4, 8, 16, 24 or 32 Order value of RasterByteOrder.Rgb or RasterByteOrder.Bgr Not a gray scale image. ViewPerspective value of RasterViewPerspective.TopLeft
This method will make one or more of the changes above to the RasterImage if needed.
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family