The drawn image becomes larger
Cause analysis
DrawImage is a device-related function. In other words, DrawImage will bring the parameters of the screen, so the DPI of its drawing image is basically 96. And my picture is from 72DPI.
For example, suppose that the width of an Image object is 216 pixels and the stored horizontal resolution value is 72 dots/inch. Because 216 divided by 72 equals 3, DrawImage will scale the image so that it has a width of 3 inches at a resolution of 96 dots/inch. That is, DrawImage will display an image with a width of 96x3 = 288 pixels.
Solution
1: (image, 0, 0, , ) ;//Add the width and height of the original image when drawing
2: (96, 96) ;//Set SetResolution so that it is displayed at 96 dots/inch resolution
Some issues with C#
Today, I need to put some small pictures (such as 125*100) into the large picture (1024*768), and then use this function, and the one I started using DrawImage(Image image, Point point).
When checking the results, I found that a very small number of small images have become larger after insertion. After debugging, I found that it was a problem with C# functions.
The problem of using DrawImage(Image image, Rectangle rect) instead was solved. It may be that there was an error in C# when calculating the image size.
The above is personal experience. I hope you can give you a reference and I hope you can support me more.