BMP to Multi TIFF with LZW compression
Posted: 2016-03-10T07:44:18-07:00
Dear Engineer:
I have a question how to convert some BMP file to One Multipage TIFF with LZW compression? I search as far as I can, and the following code are what I did, but didn't work, Please help:
using (ImageMagick.MagickImageCollection images = new ImageMagick.MagickImageCollection())
{
List<string> strImageList = CommonMethod.GetImageArray(@"C:\temp\");
for (int i = 0; i < strImageList.Count; i++)
{
ImageMagick.MagickImage myMagickImage = new ImageMagick.MagickImage(strImageList);
myMagickImage.SetDefine(ImageMagick.MagickFormat.Tiff, "compress", "LZW");
images.Add(myMagickImage);
}
string strFilePathName = @"C:\temp\image.tiff";
images.Write(strFilePathName);
return true;
}
I have a question how to convert some BMP file to One Multipage TIFF with LZW compression? I search as far as I can, and the following code are what I did, but didn't work, Please help:
using (ImageMagick.MagickImageCollection images = new ImageMagick.MagickImageCollection())
{
List<string> strImageList = CommonMethod.GetImageArray(@"C:\temp\");
for (int i = 0; i < strImageList.Count; i++)
{
ImageMagick.MagickImage myMagickImage = new ImageMagick.MagickImage(strImageList);
myMagickImage.SetDefine(ImageMagick.MagickFormat.Tiff, "compress", "LZW");
images.Add(myMagickImage);
}
string strFilePathName = @"C:\temp\image.tiff";
images.Write(strFilePathName);
return true;
}