Write Extra Channel
TIFF Extra Channels Write Bitmap
Creates a TIFF image with an extra channel.
Сode Snippet
using (var reader = new TiffReader("Copenhagen_Resized.tif"))
using (var writer = new TiffWriter("CopenhagenWithExtraChannel.tif"))
{
// Load bitmap for the extra channel.
// Note: image for extra channel must be grayscale and have the same dimensions and DPI as the source one.
using (var extraBitmap = new Bitmap("Copenhagen_Extra.tif"))
{
// Create extra channel options based on extraBitmap.
var extraChannel = new TiffExtraChannelEntry(extraBitmap, TiffChannelType.Alpha);
writer.ExtraChannels.Add(extraChannel);
Pipeline.Run(reader + writer);
}
}
Input
Copenhagen_Resized.tif
DownloadCopenhagen_Extra.tif
DownloadOutput
CopenhagenWithExtraChannel.tif
DownloadFor AI-assisted development: Download Graphics Mill Code Samples XML Catalog