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
Divers
Thread ID:
01493963
Message ID:
01493987
Vues:
54
>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?

Almost :-} Try:
g.DrawImage(img2, 0, img1.Height);
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform