获取图像高度和宽度 [英] Get image Height and Width

查看:129
本文介绍了获取图像高度和宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用C#编写的WPF:我有一个程序,用户可以点击一个框,弹出一个对话框,他们可以选择任何图像。他们选择的任何图像都将显示在框中。我希望能够显示图像的宽度和高度,因为如果他们选择的图像很小,它会调整大小以适应框。但我想显示他们选择的图像的实际宽度和高度。我该怎么做?

WPF programmed in C#: I have a program where the user can click a box and a dialog box pops up and they can select any image. Whatever image they select will appear in the box. I want to be able to display the width and height of the image, because if the image they selects is small, it'll resize to fit the box. But I want to display the actual width and height of the image they selected. How can i do that?

推荐答案

ImageSource.Width ImageSource.Height

这篇关于获取图像高度和宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆