Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Append TIFF Onto TIFF
Message
Information générale
Forum:
ASP.NET
Catégorie:
Photos et traitement d'images
Titre:
Append TIFF Onto TIFF
Divers
Thread ID:
01493963
Message ID:
01493963
Vues:
103
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform