Leadtools Namespace > RasterImage Class > GetPixelData Method : GetPixelData(Int32,Int32,IntPtr,Int32) Method |
No transformations are performed on the pixel data.
The pixel data copied may represent an index into an images's palette, a grayscale value ((Document/Medical only), or red, green, and blue color values.
This method should be called only for 8, 16, 24, 32, 48 and 64-bit images. It works as follows:
The minimum size of the returned byte array is calculated:
(BitsPerPixel + 7) / 8
You can use the SetPixelData(Int32,Int32,IntPtr,Int32) method to assign the returned value to another pixel.
This method uses image coordinates to specify the pixel. Therefore, you must account for the view perspective of the image. If you specify a pixel that is outside the image or outside the region (if the image has one), this method throws an exception.
The SetPixelData(Int32,Int32,IntPtr,Int32) method changes the data of the specified pixel.
For more information, refer to Introduction to Image Processing With LEADTOOLS.
For more information refer to Accounting for View Perspective.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2