在图片框中显示图像 [英] Displaying images in a picture box
问题描述
我试图在图片框中显示图像。图像是一组4传真
黑白图像的一张乐谱。原始分辨率为
300 X 300 dpi。我想让图片框尽可能大,这样我就能在电脑屏幕上查看扫描图像。在运行时,我希望能够通过更改图像文件名属性来查看不同的文件。
我认为图片框可以设置为图像将被拉伸或压缩以适应图片框内的图像,但我还没有
能够这样做。似乎图像框的图像很大。
也许我没有正确使用图片框选项。
所以我的问题是..Is这是对这项任务的正确控制,如果是这样,那么我做错了什么?
尝试设置picturebox sizemode tostretch image,看看那是什么
你想要
-iwdu
尝试将picturebox sizemode设置为stretch image,看看是否有什么需要
你想要
-iwdu
我试过了。似乎伸展似乎有效,但如果图像已经很大,那么它就不会减少图像。我想我可能不得不使用greaphics或图像类方法更复杂的东西
调整大小和/或重新采样图像。我想我不在这里。
" iwdu15"写道:
尝试将picturebox sizemode设置为stretch image,看看是否有你想要的
-iwdu
I am trying to display an image in a picture box. The image is a group 4 fax
black and white image of a piece of sheet music. The original resolution is
300 X 300 dpi. I want to have the picture box as large as possible so I can
view the scanned image on my computer screen. At run time, I want to be able
to view different files by changing the image file name property.
I thought the picture box could be setup so that the image would be
stretched or compressed to fit inside the picture box but I have not been
able to do so. It seems that the imageis to large for the picture box.
Perhaps I am not using the picture box options correctly.
So my question is..Is this the right control for this task, and if so, what
am I doing wrong?
try setting the picturebox sizemode to "stretch image", see if that does what
you want
-iwdu
try setting the picturebox sizemode to "stretch image", see if that does what
you want
-iwdu
I tried that. It seems that stretch seems to work but if the image is
already to large, it won''t reduce the image. I am thinking I might have to
something more complicated like using the greaphics or image class methods to
resize and/or resample the image. I am out of my element here I think.
"iwdu15" wrote:
try setting the picturebox sizemode to "stretch image", see if that does what
you want
-iwdu
这篇关于在图片框中显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!