相关疑难解决方法(0)

什么是最好的java图像处理库/方法?

我正在使用JAI媒体api和ImageMagick?

ImageMagick有一些可扩展性问题,而基于JNI的JMagick也没有吸引力.与ImageMagick相比,JAI在进行大小调整操作时效果不佳.

有没有人知道任何优秀的工具,无论是开源还是商业本土java并提供高质量的结果?

java image-manipulation image-processing

239
推荐指数
6
解决办法
22万
查看次数

用Java读写TIFF图像

我尝试了以下代码来完成读写tiff图像的任务:

 // Define the source and destination file names.
 String inputFile = /images/FarmHouse.tif
 String outputFile = /images/FarmHouse.bmp

 // Load the input image.
 RenderedOp src = JAI.create("fileload", inputFile);

 // Encode the file as a BMP image.
 FileOutputStream stream =
     new FileOutputStream(outputFile);
 JAI.create("encode", src, stream, BMP, null);

 // Store the image in the BMP format.
 JAI.create("filestore", src, outputFile, BMP, null);
Run Code Online (Sandbox Code Playgroud)

但是,当我运行代码时,我收到以下错误消息:

Caused by: java.lang.IllegalArgumentException: Only images with either 1 or 3 bands 
can be written out as BMP files.
 at com.sun.media.jai.codecimpl.BMPImageEncoder.encode(BMPImageEncoder.java:123)
 at …
Run Code Online (Sandbox Code Playgroud)

java tiff

13
推荐指数
1
解决办法
5万
查看次数

如何在Java中将TIF转换为PNG?

在Java下,将TIF文件转换为PNG的最佳方法是什么?

简单是可取的,但如果最简单的方法是使用第三方库,那么我会考虑这个解决方案.

java png tiff image image-conversion

6
推荐指数
2
解决办法
3万
查看次数