GDI+ 操作TIFF ccitt t.6 压缩

Bitmap Bi=new Bitmap("C:\img.tif");

SaveFileDialog sfdlg = new SaveFileDialog();

sfdlg.Filter = "bmp文件(*.BMP)|*.BMP|All File(*.*)|*.*";

sfdlg.ShowDialog();

EncoderParameters eps = new EncoderParameters(1);

eps.Param[0] = new EncoderParameter(System.Drawing.Imaging.Encoder.Compression, (long)EncoderValue.CompressionCCITT4);

myImageCodecInfo = GetEncoderInfo("image/tiff");

Bi.Save(sfdlg.FileName, myImageCodecInfo, eps);

  

你可能感兴趣的:(it)