#include "l_bitmap.h"
L_LTKRN_API L_INT L_ToggleBitmapCompression(pBitmap)
Toggles the compression of the specified bitmap.
Pointer to the bitmap handle.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
This function does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this function.
NOTE: This function is now obsolete. New applications should use the L_ChangeBitmapCompression function.
(Document and Medical Imaging toolkits) If the specified bitmap is compressed, calling this function will make the bitmap uncompressed. If the bitmap is uncompressed, calling this function will make the bitmap compressed.
This function only works for 1 bit per pixel images.
Required DLLs and Libraries
Win32, x64, Linux.
This function toggles bitmap compression.
L_INT ToggleBitmapCompressionExample(HWND hWnd,pBITMAPHANDLE pBitmap)
{
L_INT nRet;
L_TCHAR s[100];
if(pBitmap->BitsPerPixel == 1)
{
wsprintf(s, TEXT("BEFORE - ImageSize: %ld bytes, Type: %s"), pBitmap->Size, (pBitmap->Flags.Compressed ? TEXT("COMP") : TEXT("UNCOMP")));
MessageBox(hWnd, s, TEXT("ToggleBitmapCompression"), MB_OK);
nRet = L_ToggleBitmapCompression(pBitmap);
if( nRet == SUCCESS)
wsprintf(s, TEXT("AFTER - ImageSize: %ld bytes, Type: %s"), pBitmap->Size, (pBitmap->Flags.Compressed ? TEXT("COMP") : TEXT("UNCOMP")));
else
{
wsprintf(s, TEXT("L_ToggleBitmapCompression Failed"));
return nRet;
}
MessageBox(hWnd, s, TEXT("ToggleBitmapCompression"), MB_OK);
}
return SUCCESS;
}
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