PictureSharp.Tiff 0.7.4

dotnet add package PictureSharp.Tiff --version 0.7.4
                    
NuGet\Install-Package PictureSharp.Tiff -Version 0.7.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PictureSharp.Tiff" Version="0.7.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PictureSharp.Tiff" Version="0.7.4" />
                    
Directory.Packages.props
<PackageReference Include="PictureSharp.Tiff" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PictureSharp.Tiff --version 0.7.4
                    
#r "nuget: PictureSharp.Tiff, 0.7.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PictureSharp.Tiff@0.7.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PictureSharp.Tiff&version=0.7.4
                    
Install as a Cake Addin
#tool nuget:?package=PictureSharp.Tiff&version=0.7.4
                    
Install as a Cake Tool

PictureSharp.Tiff

TIFF and BigTIFF for PictureSharp, in pure C# with no native dependencies. Requires .NET 10+ and PictureSharp 0.9.0+.

dotnet add package PictureSharp.Tiff --version 0.7.4

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.

Keep 16-bit samples

using Image scan = Image.Load("scan.tif", new DecoderOptions { PreserveBitDepth = true });
scan.SaveAsTiff("copy.tif", new TiffEncoderOptions { BitDepth = TiffBitDepth.Sixteen });

Default loading uses 8-bit pixels. Use PreserveBitDepth for deeper scans; processing keeps that precision. See the 0.7.4 changes.

Support

  • Read: strips and tiles; none, PackBits, LZW, Deflate, JPEG, WebP, CCITT fax, NeXT and ThunderScan; grey, palette, RGB, CMYK, YCbCr and CIE Lab*, with or without alpha; integer samples of 1 to 16 and 32 bits (also signed), float of 16, 32 and 64 bits; with DecoderOptions.PreserveBitDepth, samples of more than 8 bits decode to 16-bit images (PixelType.Rgba64).
  • Write: 8-bit grey, RGB, palette and black and white, with or without alpha, and 16-bit grey and RGB from 16-bit images; the same compressions except NeXT and ThunderScan (CCITT Group 4 only).
  • Metadata: ICC, XMP, EXIF/GPS, orientation and resolution, also edited in place.
  • Not supported: old-style JPEG, JBIG, LZMA, Zstandard, ICC and ITU Lab*; writing CMYK or planar data.

Pixels match libtiff 4.5.1 and Pillow 10.2.0.

Status: ready for use and tested against libtiff and Pillow, but before 1.0 the API may still change and some real-world files may still fail; please report them with the file attached. Pure managed code with no native dependencies; CI runs on Linux, including a Native AOT build.

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.7.4 36 10/28/2026
0.7.3 53 10/26/2026
0.7.2 65 10/23/2026
0.7.1 62 10/22/2026
0.7.0 68 10/22/2026
0.6.0 56 10/22/2026
0.5.2 60 10/21/2026
0.5.1 66 10/21/2026
0.5.0 60 10/21/2026
0.4.0 62 10/21/2026
0.3.0 59 10/21/2026

0.7.4: 16-bit images on PictureSharp 0.9.0: with DecoderOptions.PreserveBitDepth, samples of more than 8 bits decode to PixelType.Rgba64; 16-bit images are written with 16-bit grey or RGB samples (TiffEncoderOptions.BitDepth). 8-bit decoding and encoding are unchanged. Requires PictureSharp 0.9.0.