publicintSetRowColumn(
introw,
int列,
IntPtrbuffer,
intbufferCount
)
PublicOverloadsFunctionSetRowColumn( _
ByValrowAsInteger, _
ByVal列AsInteger, _
ByValbufferAsIntPtr, _
ByValbufferCountAsInteger_
)AsInteger
publicintsetRowColumn(
introw,
int列,
byte[]buffer,
longbufferCount
)
public:
intSetRowColumn(
introw,
int列,
IntPtrbuffer,
intbufferCount
)
row
The number of the row to update. The first row is 0, and the last row is 1 less than the image height.
列
The column offset within the row to update. The first column offset is 0, and the last column offset is 1 less than the image width.
buffer
Pointer to an unmanaged memory buffer containing the image data. The buffer should contain uncompressed data regardless of whether the image is compressed or not.
bufferCount
The number of bytes to update. Consider the bits per pixel, and avoid specifying a number that goes past the end of the row.
For a 1-bit image, each byte represents 8 pixels. For a 4-bit image, each byte represents 2 pixels. For an 8-bit image, each byte represents 1 pixel. For a 16-bit image, every 2 bytes represents one pixel. For 24-bit images, every three bytes represents one pixel. For a 32-bit image, every four bytes represents one pixel. For a 48-bit image, every six bytes represents one pixel. For a 64-bit image, every eight bytes represents one pixel.
The number of bytes put.
By using this low-level method to update any part of a row, you can write a procedure that updates a single pixel or a rectangular area within the image.
This method accepts an offset parameter (列) in pixels and a length (bufferCount) in bytes. Therefore, you must consider the bits per pixel of the image when specifying these parameters. The following table describes the rules:
Bits Per Pixel | Column Offset (in Pixels) | Bytes to Get |
---|---|---|
1 | 米ust be a multiple of 8 (such as 0, 8, or 16). | Can be any number up to the end of the row. Consider that there are 8 pixels per byte. |
4 | 米ust be an even number (such as 0, 2, or 4). | Can be any number up to the end of the row. Consider that there are 2 pixels per byte. |
8 | Can be any column within the image. | Can be any number up to the end of the row. Consider that there is 1 pixel per byte. |
16 | Can be any column within the image. | 米ust be a multiple of 2 (such as 2, 4, or 6), because there are 2 bytes per pixel. |
24 | Can be any column within the image. | 米ust be a multiple of 3 (such as 3, 6, or 9), because there are 3 bytes per pixel. |
32 | Can be any column within the image. | 米ust be a multiple of 4 (such as 4, 8, or 12), because there are 4 bytes per pixel. |
The image memory must be locked when you use this method. Normally, you can callAccessto lock the memory before starting an operation that uses this method. Then callReleasewhen the operation is finished.
Color order is determined by theOrderproperty of theRasterImageobject. This value can beRasterByteOrder.Rgb,RasterByteOrder.Bgr, orRasterByteOrder.Romm.
Note: To calculate the correct size for a single row of image data:
(((Width * BitsPerPixel) + 31) >> 3)) & ~3
(((Width * BitsPerPixel) + 7) / 8)
RasterByteOrder.Grayis only valid for 12 and 16-bit grayscale images. Support for 12 and 16-bit grayscale images is only available in the文档/我dical Imagingeditions.
For more information, refer toIntroduction to Image Processing With LEADTOOLS.
For an example, refer toGetRowColumn.
Help Collections
Raster.NET|C API|C++ Class Library|HTML5 JavaScript
Document.NET|C API|C++ Class Library|HTML5 JavaScript
米edical.NET|C API|C++ Class Library|HTML5 JavaScript
米edical Web Viewer.NET
188宝金博怎么下载
米edia Foundation.NET|C API|Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
米onday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
米onday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.