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
Extension | Module | Value | Win32 | Win64 | Net32 | Net64 | Linux | Android | Apple | UWP | MimeType | Friendly Name |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Csv | CSV | 401 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | text/csv | CSV Format |
For a complete list for supported file formats, see Summary of All Supported File Formats.
For details of the file formats supported across products and platforms, refer to File Format Comparison Chart.
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