#include "l_bitmap.h"
L_LTKRN_API L_INT L_ChangeBitmapViewPerspective(pDstBitmap, pSrcBitmap, uStructSize, ViewPerspective)
Rotates and flips the bitmap data as necessary to achieve the desired view perspective.
Pointer to the bitmap handle referencing the converted bitmap data. Pass NULL to convert the source bitmap in place.
Pointer to the bitmap handle referencing the bitmap to convert.
Size in bytes, of the structure pointed to by pDstBitmap
, for versioning. Use sizeof(BITMAPHANDLE).
Desired view perspective. The following are possible values:
Constant | Meaning |
---|---|
TOP_LEFT | [1] Top-left of image is first in memory. |
BOTTOM_LEFT180 | [2] (Document and Medical Imaging toolkits) Same as TOP_RIGHT, which is BOTTOM_LEFT rotated clockwise by 180 degrees. |
BOTTOM_LEFT | [4] Bottom-left of image is first in memory. |
TOP_LEFT180 | [3] (Document and Medical Imaging toolkits) Same as BOTTOM_RIGHT, which is TOP_LEFT rotated clockwise by 180 degrees. |
RIGHT_TOP | [6] (Document and Medical Imaging toolkits) First row is the right side, first column is top side. |
TOP_LEFT90 | [6] (Document and Medical Imaging toolkits) Same as RIGHT_TOP, which is TOP_LEFT rotated clockwise by 90 degrees. |
LEFT_TOP | [5] (Document and Medical Imaging toolkits) First row is the left side, first column is the top side |
BOTTOM_LEFT90 | [5] (Document and Medical Imaging toolkits) Same as LEFT_TOP, which is BOTTOM_LEFT rotated clockwise by 90 degrees |
RIGHT_BOTTOM | [7] (Document and Medical Imaging toolkits) First row is the right side, first column is the bottom side |
BOTTOM_LEFT270 | [7] (Document and Medical Imaging toolkits) Same as RIGHT_BOTTOM, which is BOTTOM_LEFT rotated clockwise by 270 degrees |
LEFT_BOTTOM | [8] (Document and Medical Imaging toolkits) First row is the left side, first column is top side. |
TOP_LEFT270 | [8] (Document and Medical Imaging toolkits) Same as LEFT_BOTTOM, which is TOP_LEFT rotated clockwise by 270 degrees. |
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Use this function to change the data and the ViewPerspective field in the bitmap handle. The ViewPerspective field in the bitmap handle is changed, and thus, the display is unchanged. This function does not affect the image display. This can be used to simplify calculations that involve bitmap coordinates. For general information about view perspectives, refer to Accounting for View Perspective.
Required DLLs and Libraries
Win32, x64, Linux.
L_INT ChangeBitmapViewPerspectiveExample(L_VOID)
{
L_INT nRet;
BITMAPHANDLE LeadBitmap;
nRet = L_LoadBitmap(MAKE_IMAGE_PATH(TEXT("IMAGE1.CMP")), &LeadBitmap, sizeof(BITMAPHANDLE), 0, ORDER_BGR, NULL, NULL);
if(nRet != SUCCESS)
return nRet;
if ( LeadBitmap.ViewPerspective != TOP_LEFT)
{
nRet = L_ChangeBitmapViewPerspective ( NULL, &LeadBitmap, sizeof(BITMAPHANDLE), TOP_LEFT );
if(nRet != SUCCESS)
return nRet;
}
nRet = L_SaveBitmap(MAKE_IMAGE_PATH(TEXT("Result.BMP")), &LeadBitmap, FILE_BMP, 24, 0, NULL);
if(nRet != SUCCESS)
return nRet;
L_FreeBitmap(&LeadBitmap);
return nRet;
}
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