public bool IsFloat { get; }
@property (nonatomic, assign, readonly) BOOL IsFloat;
public boolean IsFloat()
public:
property bool IsFloat {
bool get();
}
IsFloat # get (CodecsImageInfo)
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.
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";
}
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