LEADTOOLS uses a specific codec or set of codecs (Leadtools.Codecs.?.dll) to load or save each supported format. Without the required codec(s), it cannot load or save the respective format. A list of codecs required to load or save an image as each file format are listed in the File Formats section of the Files To Be Included With Your Application topic.
When attempting to load or save images, if the codecs required for the specified format cannot be loaded, LEADTOOLS will throw a RasterException
. The Code
property will be set to a RasterExceptionCode
= -9 ("Invalid File Format") or -16 ("Feature not Supported"). To fix exceptions with these codes, copy the necessary codecs to the application folder, so the codec assemblies can be loaded when necessary.
One method to automatically copy the required codec assemblies is to add them to the project as references with the Copy Local
property set to true
. By setting the Copy Local
property to true
, Visual Studio will copy the referenced assembly to the output folder when the application is built.
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