Free Support Forum - aspose.com

Graphics.DrawImage - how to merge graphics with different DPI

Hi, I’m trying to “burn” a signature onto a TIFF image. They may have different resolutions and the API doesn’t really explain what unit of measure the various positioning and size parameters should be in. If I have two Aspose.Image objects and then create a graphics object from the larger TIIFF image and use drawimage on that to “burn” the signature image onto the graphics object, it seems to replace one pixel in the source image with one pixel from the signature image. Can you suggest how I can get the signature to come out at the correct size please. Thank you

@msutherland25

Can you please explain your requirements in the form of source images and desired output that you want to achieve. We will try to evaluate them based on that to help you further whether desired output could be achieved by API or not.

Hi, thank you for replying. I’m not sure that I need to supply example images as such. Imagine that the main image is an A4/letter sized TIFF image at 200dpi and I need to merge a signature onto the bottom left. The Signature is for example a 400dpi image with dimensions of 2" by 1". Right now, you will get a huge signature twice as big as needed since dpi is not taken into account. Perhaps they need to match and if so, can the Aspose.Imaging help to do this? Thank you

@msutherland25

I have created a ticket with ID IMAGINGNET-4330 in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be addressed.

Thank you. It would also be highly helpful to support a transparency colour that would be ignored when merging so that a large white box is not written over the original. Thanks

@msutherland25

Can you please share the details of your requirements in the form of source files and generated output so that I may help you further in this regard.