i have 1.tiff,2.tiff,3.tiff,4.tiff,5.tiff,6.tiff,7.tiff,8.tiff,9.tiff,10.tiff,11.tiff,b.tiff,
Marge In Single tiff image.
Please help me.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Basheer eriyakalamPosted Mar 6, 2014, 1:04 PM
Check the following project that allows you to merge one or more TIFF pages to another TIFF file without recompressing them:
http://support.leadtools.com/CS/forums/42410/ShowPost.aspx
amy whitePosted Feb 27, 2014, 9:32 PM
Vimlesh MishraPosted Dec 9, 2013, 5:00 AM
Ring ZhongPosted Dec 9, 2013, 3:07 AM
http://www.e-iceblue.com/Introduce/word-for-net-introduce.html
private static ImageCodecInfo GetEncoderInfo(string mimeType)
{
ImageCodecInfo[] encoders = ImageCodecInfo.GetImageEncoders();
for (int j = 0; j < encoders.Length; j++)
{
if (encoders[j].MimeType == mimeType)
return encoders[j];
}
throw new Exception(mimeType + " mime type not found in ImageCodecInfo");
}
///
/// This function will join the TIFF file with a specific compression format
///
/// Image array
/// target TIFF file to be produced
/// compression codec enum
public static void JoinTiffImages(Image[] images, string outFile, EncoderValue compressEncoder)
{
//use the save encoder
Encoder enc = Encoder.SaveFlag;
EncoderParameters ep = new EncoderParameters(2);
ep.Param[0] = new EncoderParameter(enc, (long)EncoderValue.MultiFrame);
ep.Param[1] = new EncoderParameter(Encoder.Compression, (long)compressEncoder);
Image pages = null;
int frame = 0;
ImageCodecInfo info = GetEncoderInfo("image/tiff");
foreach (Image img in images)
{
if (frame == 0)
{
pages = img;
//save the first frame
pages.Save(outFile, info, ep);
}
else
{
//save the intermediate frames
ep.Param[0] = new EncoderParameter(enc, (long)EncoderValue.FrameDimensionPage);
pages.SaveAdd(img, ep);
}
if (frame == images.Length - 1)
{
//flush and close.
ep.Param[0] = new EncoderParameter(enc, (long)EncoderValue.Flush);
pages.SaveAdd(ep);
}
frame++;
}
Hope it will help you merge the multi tiff file to a singe one.