开发者

Are there alternatives to JMagick and ImageBuffer/ImageIO for Java for resizing/cropping images?

开发者 https://www.devze.com 2023-03-01 10:44 出处:网络
I\'m currently using ImageBuffer/ImageIO. It works just fine on Windows, but for some reason, it is failing for PNG files on Linux. I have no idea why.

I'm currently using ImageBuffer/ImageIO. It works just fine on Windows, but for some reason, it is failing for PNG files on Linux. I have no idea why.

I think I just need to use another library. Because I develop on Windows, I'd like something that works on both systems effortlessly, and doesn't need to call into a process if I can avoid it. I don't want to deal with configuration hell, or require that some binary exist locally on the system somewhere just for the tests to pass.

Is there something out there that can help, or is ImageMagick pretty much the only option? It doesn't seem like Java has a开发者_如何学运维ny nice options for working with images :(

I would also like something that just plugs into Maven and works, just like any other library. My past experiences with java image libraries has taught me that it's not really up to speed with Maven and are kind of ancient (I can't remember which library this way... but I just don't want to deal with configuration and deployment problems honestly... I just want to call into a nice API).

Thanks


I switched to using JAI because it had some more flexible filtering and anti-aliasing I needed when resizing PNGs in a Java program. I haven't had any issues running on Windows or Linux - both seem to work fine.

0

精彩评论

暂无评论...
验证码 换一张
取 消