Visual Basic (Declaration) | |
---|---|
Public ReadOnly Property LoadStatus As RasterExceptionCode |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public RasterExceptionCode LoadStatus {get;} |
C++/CLI | |
---|---|
public: property RasterExceptionCode LoadStatus { RasterExceptionCode get(); } |
Return Value
A RasterExceptionCode which indicates the result of the most recent load operation.
The most common return values are:
Value | Meaning |
---|---|
RasterExceptionCode.Success | The image loaded by the last load call does not have any errors. |
RasterExceptionCode.CompressedDataFailure | There were errors decoding the last image. The bottom part of the image might be corrupted. |
RasterExceptionCode.BadResyncMarker | 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. |
RasterExceptionCode.FileRead | The file was truncated. The bottom part of the image is missing. |
This example will load an image and checks whether the image has corrupted areas
Visual Basic | Copy Code |
---|---|
Private Sub LoadStatusExample(ByVal fileName As String) |
C# | Copy Code |
---|---|
void LoadStatusExample(string fileName) |
An error return code is a warning that portions of the image that was last loaded might be corrupted.
This property should be called after a load method has been sucessfully called. 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 method threw an exception, then this method should not be used, as its return value is undefined.
Note that this property is valid for the current thread. So it should be used in the same thread as the load method.
This is valid for all the methods that will load an image, including RasterCodecs.Load(String) and FeedLoad.
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family