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