#include "ltwrappr.h"

static L_INT LBitmapBase::GetLoadStatus()

Detects whether the image that was last loaded has an error.



The image loaded by the last load call does not have any errors.


There were errors decoding the last image. The bottom part of the image might be corrupted.


Some of the resync markers were incorrect or missing while decoding the last image. Resync markers are used by JPEG files to recover from decoding errors. Portions of the image are corrupted. They are indicated by a checkerboard pattern.


The file was truncated. The bottom part of the image is missing.


The file may not been loaded completely or it may have missing parts.

< 1

Another error occurred while loading the last image. Refer to Return Codes.


The returned error code describes a warning that portions of the image that was last loaded might be corrupted.

This function should be called after a load function returned SUCCESS. This value is reset after each page is loaded, so if you are loading multiple pages, this error code is valid only for the last page.

If the last load function returned an error code, then this function should not be used, as its return value is undefined.

Note that the return value is valid for the current thread. So LBitmapBase::GetLoadStatus should be called in the same thread as the load function.

This function is valid for all of the functions that will load a bitmap. Examples of such functions: LFile::Load, LFile::LoadFile, LFile::LoadOffset, LFile::FeedLoad, etc.

Required DLLs and Libraries


For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.


Win32, x64.

See Also


LFile::LoadFile, LFile::Load, LFile::FeedLoad, LMemoryFile::LoadMemory, LMemoryFile::LoadMemoryTile, LFile::LoadOffset, LBitmapList::Load, LFile::LoadTile


Raster Image Functions: Loading Files


Loading and Saving Images


#define MAKE_IMAGE_PATH(pFileName) TEXT("C:\\Users\\Public\\Documents\\LEADTOOLS Images\\")pFileName 
#define FILENAME MAKE_IMAGE_PATH(TEXT("clean.tif"))// This example  will load an image and display a message box 
// indicating whether the image has corrupted areas or not 
L_INT LBitmapBase__GetLoadStatusExample(HWND hWnd) 
   L_INT nRet; 
   LBitmap Bitmap; 
   nRet = Bitmap.Load(FILENAME); 
   if(nRet == SUCCESS) 
      nRet = LBitmap::GetLoadStatus(); 
      if(nRet == SUCCESS) 
      TEXT("The image was loaded successfully and with no errors"), 
      TEXT("SUCCESS"), MB_OK); 
      TEXT("The image was loaded, but it might have corrupted areas"), 
      TEXT("Warning!"), MB_OK); 
      MessageBox(hWnd, TEXT("loading failed!"), TEXT("ERROR"), MB_OK); 
   return nRet; 

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Raster Imaging C++ Class Library Help