#include "l_bitmap.h"
L_LTIMGCLR_API L_INT L_LineProfile2(pBitmap, pFirstPoint, pSecondPoint, pRed, pGreen, pBlue, uFlags)
Allocates three arrays and updates them with the R, G and B profile for each pixel in the specified line.
Pointer to the bitmap handle that references the bitmap for which to get the line profile.
pointer to a POINT structure that contains the starting point for the line.
pointer to a POINT structure that contains the end point for the line. Information for this point is included in the arrays.
Pointer to a pointer to be updated with an array that contains the red values for the line specified by FirstPoint and SecondPoint. A memory buffer for this array is allocated by the function. When the array is no longer needed, it should be freed by the user by calling the GlobalFreePtr macro.
Pointer to a pointer to be updated with an array that contains the green values for the line specified by FirstPoint and SecondPoint. A memory buffer for this array is allocated by the function. When the array is no longer needed, it should be freed by the user by calling the GlobalFreePtr macro.
Pointer to a pointer to be updated with an array that contains the blue values for the line specified by FirstPoint and SecondPoint. A memory buffer for this array is allocated by the function. When the array is no longer needed, it should be freed by the user by calling the GlobalFreePtr macro.
Reserved for future use. Must be 0.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
This function supports signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this function.
The range of the returned values will be:
This function allocates memory buffers for the three arrays using the GlobalAllocPtr macro. When the buffers are no longer needed, they should be freed by calling the GlobalFreePtr macro. If the GlobalFreePtr macro is not supported by the compiler, the buffers can be freed using the following code:
void MyGlobalFreePtr(void *ptr)
{
HGLOBAL hGlobal = (HGLOBAL) GlobalHandle(ptr);
GlobalUnlock(hGlobal);
GlobalFree(hGlobal);
}
This function supports 12- and 16-bit grayscale and 48 and 64-bit color images. Support for 12- and 16-bit grayscale and 48- and 64-bit color images is available in the Document and Medical Imaging toolkits.
This function does not support 32-bit grayscale images. It returns the error code ERROR_GRAY32_UNSUPPORTED if a 32-bit grayscale image is passed to this function.
Required DLLs and Libraries
Win32, x64, Linux.
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