Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append TIFF Onto TIFF
Message
General information
Forum:
ASP.NET
Category:
Pictures and Image processing
Title:
Append TIFF Onto TIFF
Miscellaneous
Thread ID:
01493963
Message ID:
01493963
Views:
102
I'm trying to create a multi page tiff from 2 seperate tiffs:
public static void AppendToTiff(string TargetTiff, string TiffToAdd)
{
    Image img1 = Image.FromFile(TargetTiff);
    Image img2 = Image.FromFile(TiffToAdd);
    int Height = img1.Height + img2.Height;
    int Width = img1.Width;

    string path = Path.GetDirectoryName(TargetTiff);
    string tempfile = path + "\\" + Path.GetFileNameWithoutExtension(Path.GetTempFileName()) + ".tiff";

    using (Bitmap newImg = new Bitmap(Width, Height))
    {
        Graphics g = Graphics.FromImage(newImg);
        g.DrawImage(img1, 0, 0);
        g.DrawImage(img2, 0, Height);
        g.Save();
        newImg.Save(tempfile);
    }
}
The result is one tiff, the correct size, but with only the first image showing at the top. Anyone know how to do this?
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Next
Reply
Map
View

Click here to load this message in the networking platform