double DPI = pictureBox1.Image.HorizontalResolution;//获得分辨率 gisoracle
double w = 1.0 * pictureBox1.Image.Width / DPI * 25.4;
double h = 1.0 * pictureBox1.Image.Height / DPI * 25.4;
MessageBox.Show(w.ToString("f2") + ":" + h.ToString("f2"));
时间: 2024-10-17 23:05:52