ThrowExceptionsOnInvalidImages Property (original) (raw)

Summary

A value indicating whether to throw an exception instead of returning a null reference on certain methods of this RasterCodecs object.

Syntax

public bool ThrowExceptionsOnInvalidImages { get; set; } 

public boolean getThrowExceptionsOnInvalidImages() public void setThrowExceptionsOnInvalidImages(boolean value)

public: property bool ThrowExceptionsOnInvalidImages { bool get(); void set ( bool ); }

Property Value

A value indicating whether to throw an exception instead of returning a null reference on certain methods of this RasterCodecs object. The default value is true.

Example

using Leadtools; using Leadtools.Codecs; using Leadtools.ImageProcessing; using Leadtools.ImageProcessing.Color; using Leadtools.Svg; public void ThrowExceptionsOnInvalidImagesExample() { RasterCodecs codecs = new RasterCodecs(); // enable codec exceptions codecs.ThrowExceptionsOnInvalidImages = true; try { RasterImage image = codecs.Load("some non-image file"); } catch { Debug.WriteLine("exception caught - sample sucess"); } // Clean up codecs.Dispose(); }

Leadtools.Codecs Assembly

CompactFile(Stream,Stream,int,int,bool,int,int,bool,int,CodecsSavePageMode,bool,bool) Method

CompactFile(Stream,Stream,int,int,bool,long,int,bool,long,CodecsSavePageMode,bool,bool,bool) Method

CompactFile(string,string,int,int,bool,int,int,bool,int,CodecsSavePageMode,bool,bool) Method

CompactFile(string,string,int,int,bool,long,int,bool,long,CodecsSavePageMode,bool,bool,bool) Method

StartCompress(int,int,int,RasterByteOrder,RasterViewPerspective,int,byte[],int,int,CodecsCompression,CodecsCompressDataCallback) Method