←Select platform

CodecsCodecLoadMode Enumeration

Summary
The handling mode for a file codec.
Syntax
C#
C++/CLI
Java
Python
public enum CodecsCodecLoadMode   
public enum CodecsCodecLoadMode 
public enum class CodecsCodecLoadMode   
class CodecsCodecLoadMode(Enum): 
   Dynamic = 0 
   Fixed = 1 
   Ignored = 2 
Members
ValueMemberDescription
0Dynamic The codec is dynamically loaded and freed as necessary.
1Fixed The codec is loaded into memory and will never be unloaded. (This makes the file handling very fast).
2Ignored The codec is ignored. You cannot load, save or get the file information for any files normally handled by this codec.
Remarks

LEADTOOLS maintains a list of codecs used for querying for the file information.

Fixed codecs are never unloaded from the list. This makes the file detection of file formats very fast.

Dynamic codecs are dynamically unloaded when the number of loaded codecs exceeds the number set through RasterCodecs.PreloadCodecs.

Ignored codecs will never be used. You cannot load, save or obtain information on file formats normally handled by a codec that is ignored.

Once you save or load a file handled by a certain codec, that codec will be permanently loaded into memory. From that point on, setting the codecs load mode has no effect.

Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing; 
using Leadtools.ImageProcessing.Color; 
using Leadtools.Svg; 
 
 
public void GetCodecInformationExample() 
{ 
   RasterCodecs codecs = new RasterCodecs(); 
 
   CodecsCodecInformation codecInfo = codecs.GetCodecInformation("Tif"); 
   Debug.WriteLine("CheckedByInformation : {0}", codecInfo.CheckedByInformation); 
   Debug.WriteLine("ExtensionList : {0}", codecInfo.ExtensionList); 
   Debug.WriteLine("IsIgnored : {0}", codecInfo.IsIgnored.ToString()); 
   Debug.WriteLine("IsPresent : {0}", codecInfo.IsPresent.ToString()); 
   Debug.WriteLine("IsSlowInformation : {0}", codecInfo.IsSlowInformation.ToString()); 
   Debug.WriteLine("LoadMode : {0}", codecInfo.LoadMode.ToString()); 
   Debug.WriteLine("Name : {0}", codecInfo.Name); 
 
   // Parse the load modes 
   CodecsCodecLoadMode[] loadModes = (CodecsCodecLoadMode[])Enum.GetValues(typeof(CodecsCodecLoadMode)); 
   foreach(var loadMode in loadModes) 
   { 
      codecs.SetCodecsInformation(codecs.GetCodecsInformation()); 
      Debug.WriteLine($"Load mode: {loadMode}"); 
   } 
 
   // change the extensions that the ptk filter tries to handle 
   codecInfo.ExtensionList = "ptk;ptoka;ptoca;ptca;ptka"; 
   codecs.SetCodecInformation(codecInfo); 
 
   // re-display the new settings 
   codecInfo = codecs.GetCodecInformation("tif"); 
   Debug.WriteLine("ExtensionList : {0}", codecInfo.ExtensionList); 
 
   // Clean up 
   codecs.Dispose(); 
} 
Requirements

Target Platforms

See Also

Reference

Leadtools.Codecs Namespace

Help Version 22.0.2023.5.5
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Codecs Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.