减小图像尺寸,但保持最高质量/分辨率?
我正在使用 bitmap.GetThumbnailImage() 调整图像大小,但是我似乎失去了图像质量/分辨率。例如,原始图像的分辨率为 300dpi,调整后的 1 要小得多。
调整大小时如何保持图像分辨率?
I'm resizing an image using bitmap.GetThumbnailImage()
however I seem to be losing image quality/resolution. For example the original image was 300dpi resolution, and the resized 1 is much smaller.
How can I retain the image resolution when resizing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是我用来缩小图像的函数。质量非常好。
我的使用方法如下:
如果您需要帮助来运行它,请大声喊叫。
Here's a function I use to reduce my images. The quality is excellent.
Here's how I use it:
Holler if you need help getting it running.
看看设置 InterpolationMode (MSDN 链接)
您还应该采取看一下这个链接:创建高品质缩略图 - 动态调整图像大小
本质上,您的代码类似于以下内容:
Bitmap imageToScale = new bitmap( //用要缩小的图像完成此操作
Take a look at setting the InterpolationMode (MSDN link)
You should also take a look at this link: Create High Quality Thumbnail - Resize Image Dynamically
Essentially, you have code that looks similar to the following:
Bitmap imageToScale = new bitmap( //finish this with the image you want to reduce