我想在tiff文件(tiff上的Png图像)上加盖印章,但不更改其属性(如DPI)。 我已经尝试过下面的代码,但是它正在减小tiff的大小。
System.Drawing.Bitmap bitmap = (System.Drawing.Bitmap) System.Drawing.Image.FromFile (inputpath);
Bitmap EditableImg = new Bitmap (bitmap);
System.Drawing.Bitmap bitmapStamping = (System.Drawing.Bitmap) System.Drawing.Image.FromFile (stamppath);
using (System.Drawing.Graphics graphics = System.Drawing.Graphics.FromImage (EditableImg)) {
graphics.DrawImage (bitmapStamping, secondLocation);
}
EditableImg.Save (outputpath);