←Select platform

SetPixelData(int,int,IntPtr,int) Method

Summary

Changes the data of the specified pixel by copying from an unmanaged memory buffer.

Syntax

C#
VB
Java
WinRT C#
C++
public void SetPixelData( 
   int row, 
   int column, 
   IntPtr data, 
   int dataSize 
) 
Public Overloads Sub SetPixelData( _ 
   ByVal row As Integer, _ 
   ByVal column As Integer, _ 
   ByVal data As IntPtr, _ 
   ByVal dataSize As Integer _ 
)  
public void SetPixelData(  
   int row, 
   int column, 
   IntPtr data, 
   int dataSize 
) 
public void setPixelData( 
  int row,  
  int column,  
  byte data[],  
  int dataSize 
) 
             
 function Leadtools.RasterImage.SetPixelData(Int32,Int32,IntPtr,Int32)(  
   row , 
   column , 
   data , 
   dataSize  
) 
public: 
void SetPixelData(  
   int row, 
   int column, 
   IntPtr data, 
   int dataSize 
)  

Parameters

row
The zero-based row number of the pixel.

column
The zero-based column number of the pixel.

data
Pointer to an unmanaged memory buffer that contains the pixel data to set. This buffer should contain ((BitsPerPixel + 7) / 8) bytes.

dataSize
Size of the data unmanaged memory buffer.

Remarks

The image memory must be locked when you use this method. Normally, you can call Access to lock the memory before starting an operation that uses this method. Then call Release when the operation is finished.

No transformations are performed on the pixel data.

This method should be called only for 8, 16, 24, 32, 48 and 64-bit images.

Use the GetPixelData method to get data of a specified pixel.

For more information, refer to Introduction to Image Processing With LEADTOOLS.

For more information refer to Accounting for View Perspective.

Example

For an example, refer to GetPixelData.

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools Assembly