Предоставляет низкоуровневые функции для управления файлом JPEG2000.
Вот C#/VB.NET код, который демонстрирует, как преобразовать JPEG файл2000 в TIFF файл.
' Converts Jpeg2000 file to Tiff file.
Public Shared Sub ConvertJpeg2000ToTiff(jpeg2000Filename As String, tiffFilename As String)
Using stream As New System.IO.FileStream(jpeg2000Filename, System.IO.FileMode.Open, System.IO.FileAccess.Read)
If Not Vintasoft.Imaging.Codecs.ImageFiles.Jpeg2000.Jpeg2000File.IsValidFormat(stream) Then
Throw New System.ApplicationException()
End If
Dim image As Vintasoft.Imaging.VintasoftImage
Using file As New Vintasoft.Imaging.Codecs.ImageFiles.Jpeg2000.Jpeg2000File(stream)
image = file.Page.GetImage()
End Using
Dim tiffEncoder As New Vintasoft.Imaging.Codecs.Encoders.TiffEncoder()
image.Save(tiffFilename, tiffEncoder)
tiffEncoder.Dispose()
image.Dispose()
End Using
End Sub
// Converts Jpeg2000 file to Tiff file.
public static void ConvertJpeg2000ToTiff(string jpeg2000Filename, string tiffFilename)
{
using (System.IO.FileStream stream = new System.IO.FileStream(
jpeg2000Filename, System.IO.FileMode.Open, System.IO.FileAccess.Read))
{
if (!Vintasoft.Imaging.Codecs.ImageFiles.Jpeg2000.Jpeg2000File.IsValidFormat(stream))
{
throw new System.ApplicationException();
}
Vintasoft.Imaging.VintasoftImage image;
using (Vintasoft.Imaging.Codecs.ImageFiles.Jpeg2000.Jpeg2000File file =
new Vintasoft.Imaging.Codecs.ImageFiles.Jpeg2000.Jpeg2000File(stream))
{
image = file.Page.GetImage();
}
Vintasoft.Imaging.Codecs.Encoders.TiffEncoder tiffEncoder =
new Vintasoft.Imaging.Codecs.Encoders.TiffEncoder();
image.Save(tiffFilename, tiffEncoder);
tiffEncoder.Dispose();
image.Dispose();
}
}
Целевые платформы: .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5