ASP.net C# 调整图像大小 SQL 上传
我一直在寻找一种在将图像上传到数据库之前调整图像大小的方法。现在文件刚刚上传,如果它们的大小不正确,那么我的页面看起来会一团糟。在将图像上传到数据库之前,如何调整图像大小,我想上传原始大小的图像和正确的大小。这可以通过 ASP.net 实现吗?我看过一些有关图像调整大小的教程,但没有一个有帮助,如果有人可以提供帮助那就太好了。我开始查看 this 教程,但无法在我的 SQL 中实现它上传。
谢谢
I have been looking all over for a way to resize an image before it is uploaded to my database. Right now the files are just upload and if they are not the correct size then my pages look like a mess. How would I resize the image before I upload it to my database, I would like to upload an original sized image, and correct size. Is this possible with ASP.net. I have seen some tutorials on image resizing but none of them were helpful, if anyone can help that would be great. I started looking at this tutorial but wasnt able to implement it in my SQL upload.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
像这样,我使用 MVC,因此使用
HttpPostedFileBase
。然而,这是获取文件输入类型的输入并返回字节数组,非常适合上传到数据库。Something like this, I am using MVC thus the
HttpPostedFileBase
. However this is taking the input of afile
input type and returning a byte array, perfect for uploading to DB.