public static void SaveTiff8(string outputFilename, IBitmap <short> bitmap) { using (var tiffWriter = new TiffWriter(File.Create(outputFilename))) { var bitmap2 = bitmap.Convert((p) => (byte)((p >> 8) + 128)); tiffWriter.WriteImageFile(bitmap2); } }
public static void SaveTiff16(string outputFilename, IBitmap <ushort> bitmap) { var bitmap2 = bitmap.Convert((p) => { return((ushort)(p - short.MinValue)); }); SaveTiff16(outputFilename, bitmap2); }