using System; using System.Drawing; using System.Linq; using System.Windows.Forms; using System.Drawing.Imaging; namespace WindowsFormsAppTIFF_1L { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { Bitmap bmp = new Bitmap("C:/hoge/example.tiff"); ImageCodecInfo[] enc = ImageCodecInfo.GetImageEncoders(); ImageCodecInfo tiffICI = enc.First(p => p.MimeType == "image/tiff"); EncoderParameters epMultiFrame = new EncoderParameters(2); // 1.の画像 string tif = "C:/hoge/example_1L.tiff"; epMultiFrame.Param[0] = new EncoderParameter(System.Drawing.Imaging.Encoder.Compression, (long)EncoderValue.CompressionLZW); epMultiFrame.Param[1] = new EncoderParameter(System.Drawing.Imaging.Encoder.ColorDepth, 1L); bmp.Save(tif, tiffICI, epMultiFrame); } } }