We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Add a footer to Tif images

Hi,

I have a requirement where I need to insert a QR code on every page of Tiff image.

Is it possible to insert QR code in footer of tiff image? If yes , can you please provide code sample for same?

Regards,

Dinesh

Hi Dinesh,


Thank you for contacting Aspose support.

You can use the Graphics.DrawImage method to insert any image on every page/frame of the multi-page Tiff image. Please check the below provided code snippet and attached samples for your reference.

C#

//Load an existing Tiff image
using (TiffImage multiImage = (TiffImage)Image.Load(myDir + “input.tiff”))
{
//Load image to be inserted
using (Image image = Image.Load(myDir + “QR.jpg”))
{
//Iterate over the TiffFrames in TiffImage
//Tiff Image could have several Frames
foreach (TiffFrame tiffFrame in multiImage.Frames)
{
//Create and initialize an instance of Graphics class
Graphics graphics = new Graphics(tiffFrame);

//Draw the image on TiffFrame canvas at specified location
graphics.DrawImage(image, tiffFrame.Width - (image.Width + 10), tiffFrame.Height - (image.Height + 10));
}
//Export to Tiff file format using the default options
multiImage.Save(myDir + “output.tiff”);
}
}

Please feel free to write back in case you have further questions.

Thank you very much. That resolves my problem.

But I am facing performance issues with QR code insertion and reorganization. I have already posted the issue on ASPOSE forums.

Please visit the link below.

Hi Dinesh,


Thank you for writing back.

I believe you are using an older version of the Aspose.Imaging for .NET API, therefore we would suggest you to give a try to our latest version of Aspose.Imaging for .NET 2.3.0 in your environment. Please note, with every release, we improve the performance in terms of time as well as memory so the latest build is expected to perform better than the previous releases.