LEADTOOLS supports loading CSV (Comma-Separated Values) files, and displaying them as raster or SVG images.
The default extension used by this format is: CSV.
Multi-page files are supported.
LEADTOOLS supports loading this format as either a raster image or an SVG (Scalable Vector Graphics) document.
The file constants associated with this file format are:
|Constant||Read Support||Write Support||Description|
|Txt||24 BPP *||Unsupported||CSV format|
CSV files do not have a signature. Therefore, LEADTOOLS will check the extension of the file name and if it is .csv, then it will automatically use the text filter to load the file.
When loading from a stream or if the file name extension is not .csv, LEADTOOLS will not use the text filter to load the image data. Instead, an invalid file format error is returned. The following code snippet will show how to force LEADTOOLS to load a stream (or a file without the .csv extension) using the text filter:
// Either set CodecsLoadOptions.Format to Csv to ignore the RasterCodecs that the image data is text:
rasterCodecs.Options.Load.Format = RasterImageFormat.Csv;
// Or set CodecsLoadOptions.Name to anything.csv to trick RasterCodecs into thinking the file name has a .csv extension:
rasterCodecs.Options.Load.Name = "anything.csv";
// Now load or get information about the image ...
CodecsImageInfo info = rasterCodecs.GetInformation(stream, true);
RasterImage image = rasterCodecs.Load(stream, 1);
// Or a file with an extension other than .csv, such as .data:
CodecsImageInfo info = rasterCodecs.GetInformation("file.data", true);
RasterImage image = rasterCodecs.Load("file.data", 1);
* When the TXT format is rasterized, it will generate a 24 BPP bitmap.
Related Formats: File Formats Text File Format TXT
Platforms: .NET 4, .NET Standard
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries