#include "l_bitmap.h"
L_LTKRN_API L_SSIZE_T L_PutBitmapRow(pBitmap, pBuffer, nRow, uBytes)
Copies a row of image data from a buffer to a bitmap. The data is copied exactly as it is stored in the buffer. The buffer to which pBuffer
points contains uncompressed data.
Pointer to the bitmap handle referencing the bitmap to copy the row into.
Pointer to the buffer containing the image data.
The number of the row to update. The first row is 0, and the last row is 1 less than the bitmap height.
Number of bytes to be updated. Use the BytesPerLine field in the bitmap handle to determine the byte count of each line.
Value | Meaning |
---|---|
>=1 | The number of bytes put. |
< 1 | An error occurred. Refer to Return Codes. |
The bitmap memory must be locked when you use this function. Normally, you can call L_AccessBitmap to lock the memory before starting an operation that uses this function, then call L_ReleaseBitmap when the operation is finished.
You can use the bits per pixel of the image to determine the number of bytes to set the uBytes
parameter. If the image is 8-bit then each byte is an index to the palette. If the image is a 24-bit image, then each three bytes represents one pixel element. Color order is determined by the Order field in the bitmap handle. This value can be ORDER_RGB, ORDER_BGR, ORDER_GRAY or ORDER_ROMM.
Note: To calculate the correct size for a single row of image data:
Windows: (((Width * BitsPerPixel) + 31) >> 3)) &~3
Linux: (((Width * BitsPerPixel) + 7) / 8)
Required DLLs and Libraries
Win32, x64, Linux.
For an example, refer to L_GetBitmapRow. For complete sample code, refer to the RESIZE example.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media 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
Imaging, Medical, and Document