在Windows应用程序中调整图像大小 [英] Resize image in windows appliation
问题描述
我再次提出有关图片上传的问题.
我想先调整图像大小,然后再保存其他加载.
例如,我选择了尺寸为500px * 350px的"D:\ MemberImage \ MyPhoto.jpg".
现在,在将此文件保存到其他位置之前,我想将此选定文件的大小调整为160px * 120px,然后将此调整大小后的图像保存在新位置.
我的意思是当我保存文件时
File.Copy(openFileDialog1.filename,@"D:\ Images \ new.jpg");
我的new.jpg文件的大小应为160px * 120px;
请帮我一些
感谢和问候.
I once again one question about image upload.
I want to resize the image before saving at other loadtion.
For example i have selected "D:\MemberImage\MyPhoto.jpg" with size 500px*350px.
Now before saving this file at other location i want to resize this selected file to 160px*120px and then save this resized image in new location.
I mean when i save my file
File.Copy(openFileDialog1.filename,@"D:\Images\new.jpg");
my new.jpg file should be of size 160px*120px;
Please help me some
Thanks and regards.
推荐答案
请参阅链接
^ ]
See the link
http://forums.asp.net/t/1713181.aspx/1?Adding+watermark+to+an+image+stored+on+the+server+side+folder[^]
看这里:
使用适用于.NET的GDI +调整照片图像的大小 [ http://www.switchonthecode.com/tutorials/csharp-tutorial-图像编辑节省裁切和调整大小 [ ^ ]
Look here:
Resizing a Photographic image with GDI+ for .NET[^]
Or a much simpler approach:
http://www.switchonthecode.com/tutorials/csharp-tutorial-image-editing-saving-cropping-and-resizing[^]
此链接将帮助您 ^ ]
This link would help you http://www.switchonthecode.com/tutorials/csharp-tutorial-image-editing-saving-cropping-and-resizing[^]
这篇关于在Windows应用程序中调整图像大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!