图像调整大小质量(Java) [英] Image resize quality (Java)

查看:123
本文介绍了图像调整大小质量(Java)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个开源应用程序,可以将照片上传到Facebook。为了节省带宽,照片会在上传前自动调整大小(Facebook规定了最大尺寸限制)。有些人抱怨照片质量,事实上你可以看到差异(参见此问题,用于某些演示图像)。

I have an open-source app which uploads photos to Facebook. To save bandwidth, the photos are automatically resized before uploading (Facebook imposes a maximum size limit). A few people have complained about the photo quality, and in fact you can see the difference (see this issue for some demo images).

所以我的问题是,在Java中缩小图像(即照片)的最佳方法是什么,而不会损失质量,或者至少是质量损失/伪影最少?

So my question is, what is the "best" way of scaling down images (i.e. photos) in Java without losing quality, or at least, with minimal quality loss / artifacts?

你可以看到我当前的代码这里(通过此页)。

You can see the current code I have here (resize code via this page).

推荐答案

我'我尝试了所有 - 包括技巧这里,我可以说你最好在任何接口上使用ImageMagick,Javas成像库在它到来时就不能用了鼻烟对此。您需要支持如此多的格式和算法才能使其正确。

I've tried it all - including the tricks here, and all I can say that you're better of using ImageMagick with whatever interface, Javas imaging libraries are just not up to snuff when it comes to this. You need to support so many formats and algorithms to get it right.

这篇关于图像调整大小质量(Java)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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