IsFloat Property (original) (raw)

Summary

Determines whether the image data is float.

Syntax

C#

Objective-C

C++/CLI

Java

Python

public bool IsFloat { get; } 
@property (nonatomic, assign, readonly) BOOL IsFloat; 

public: property bool IsFloat { bool get(); }

Property Value

true if the image data contains signed (negative) values; false, otherwise. The default value is false.

Floating point values are usually converted during load to integer values. You can avoid this conversion by setting CodecsLoadOptions.NoImageDataConversion = true to load the original floating point values. See Working With Floating Point Images for more details.

The floating point values can be positive or negative even when CodecsImageInfo.IsSigned is set to false.

Example

using Leadtools; using Leadtools.Codecs; public void CodecsImageInfoIsFloatExample() { string srcFile = Path.Combine(LEAD_VARS.ImagesDir, "cannon_noisy.png"); using (RasterCodecs codecs = new RasterCodecs()) using (CodecsImageInfo info = codecs.GetInformation(srcFile, true)) { if (info.IsFloat) { Debug.WriteLine("The source file has floating point image data"); codecs.Options.Load.NoImageDataConversion = true; using (RasterImage image = codecs.Load(srcFile, 1)) { /* do something with the floating point image data */ } } else Debug.WriteLine("The source file does not have floating point image data"); } } static class LEAD_VARS { public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; }

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