Visual Basic (Declaration) | |
---|---|
Public Event LoadInformation() As EventHandler(Of CodecsLoadInformationEventArgs) |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public event EventHandler<CodecsLoadInformationEventArgs> LoadInformation() |
Managed Extensions for C++ | |
---|---|
public: __event EventHandler<CodecsLoadInformationEventArgs>* LoadInformation(); |
C++/CLI | |
---|---|
public: event EventHandler<CodecsLoadInformationEventArgs>^ LoadInformation(); |
Visual Basic | Copy Code |
---|---|
RasterCodecs.LoadInformation |
C# | Copy Code |
---|---|
RasterCodecs.LoadInformation |
The LoadInformation event will occur when LEADTOOLS cannot recognize the image file format during a call to GetInformation. This event can be used for loading raw FAX data (CCITT Group 3 or Group 4), raw run-length-encoded data (4-bit or 8-bit), raw Bitfield compressed data, raw PackBits compressed data or raw uncompressed data.
To load a raw fax file, you must subscribe to this event first. When the toolkit fails to recognize the image file format, it will fire this event. If you know the size of the fax image, then set the values in the CodecsLoadInformationEventArgs.Width and CodecsLoadInformationEventArgs.Height properties of the CodecsLoadInformationEventArgs passed as the event data. To automatically detect the width and height of the fax file, set CodecsLoadInformationEventArgs.Width and CodecsLoadInformationEventArgs.Height to -1.
To load raw uncompressed data, you must subscribe to this event first. When the toolkit fails to recognize the image file format, it will fire this event. Set the CodecsLoadInformationEventArgs.Format property to RasterImageFormat.Raw. Valid values must also be set for the following properties:
CodecsLoadInformationEventArgs.Width CodecsLoadInformationEventArgs.Height CodecsLoadInformationEventArgs.BitsPerPixel CodecsLoadInformationEventArgs.Offset (byte location in file where raw data begins)
If each line of RAW data is padded so that the number of bytes is a multiple of 4 (as is the case with raw
Windows BMP data), set
CodecsLoadInformationEventArgs.Pad4 to true. Include an orientation
in the CodecsLoadInformationEventArgs.ViewPerspective to
load with the proper orientation. For example, raw Windows BMP data is stored with a
RasterViewPerspective.BottomLeft orientation. If the orientation is
unknown, then set it to RasterViewPerspective.BottomLeft. If the raw
data is 8 bits per pixel or less, then the image is palettized and a palette must be generated. If this is the case,
pass in a valid palette with 1 >gt; bits/pixel
number of entries to the
CodecsLoadInformationEventArgs.SetPalette method.
Set the correct color order in the CodecsLoadInformationEventArgs.Order property. For example, if the order of the data is BGR, then set this value to RasterByteOrder.Bgr.
For more information, refer to CodecsLoadInformationEventArgs.
Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family