PictureSharp.Tiff
0.5.2
See the version list below for details.
dotnet add package PictureSharp.Tiff --version 0.5.2
NuGet\Install-Package PictureSharp.Tiff -Version 0.5.2
<PackageReference Include="PictureSharp.Tiff" Version="0.5.2" />
<PackageVersion Include="PictureSharp.Tiff" Version="0.5.2" />
<PackageReference Include="PictureSharp.Tiff" />
paket add PictureSharp.Tiff --version 0.5.2
#r "nuget: PictureSharp.Tiff, 0.5.2"
#:package PictureSharp.Tiff@0.5.2
#addin nuget:?package=PictureSharp.Tiff&version=0.5.2
#tool nuget:?package=PictureSharp.Tiff&version=0.5.2
PictureSharp.Tiff
TIFF and BigTIFF for PictureSharp, in pure C# with no native dependencies. Requires .NET 10+ and PictureSharp 0.7.9+.
dotnet add package PictureSharp.Tiff
Usage
Register the format once, then load and save .tif files like any other image:
using PictureSharp;
using PictureSharp.Formats.Tiff;
ImageConfiguration.Default = ImageConfiguration.Default.ToBuilder().AddFormat(new TiffFormat()).Build();
using var image = Image.Load("scan.tif");
image.Mutate(x => x.Resize(1600, 0));
image.SaveAsTiff("small.tif");
Loading reads the first page and keeps ICC, EXIF and XMP. Saving uses lossless LZW and writes each frame as a page. Other pages, JPEG compression and tiles are covered in the guides below.
Support
- Read: strips and tiles; none, PackBits, LZW, Deflate, JPEG, WebP and CCITT fax; grey, palette, RGB, CMYK, YCbCr and float, with or without alpha.
- Write: 8-bit grey, RGB, palette and black and white, with or without alpha; the same compressions (CCITT Group 4 only).
- Metadata: ICC, XMP, EXIF/GPS, orientation and resolution, also edited in place.
- Not supported: old-style JPEG, JBIG, LZMA, Zstandard, CIE Lab, signed samples; writing 16-bit, CMYK or planar data.
Pixels match libtiff 4.5.1 and Pillow 10.2.0.
Guides: decoding · encoding · metadata · release notes
License
MIT. Ported sources (libtiff, Pillow conversion rules) are listed in THIRD-PARTY-NOTICES.txt.
Build
dotnet build -c Release
dotnet test -c Release
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- PictureSharp (>= 0.7.9)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
0.5.2: faster automatic colour type when writing (one vectorized pass over the pixels, about 8 ms instead of 30 ms per 24 MP); written files are byte-identical to 0.5.1. Requires PictureSharp 0.7.9. Notes: https://github.com/art-ix/PictureSharp.Tiff/blob/v0.5.2/docs/releases/release-0.5.2.md