JavaAzure:Image Magick提供0 KB的输出?
我已经将Image magick与Java Web应用程序集成,并将其部署在Azure应用程序服务上。在azure上,我得到了0kb作为一个图像的输出图像,而同一个图像在我的本地机器上得到了很好的转换。 我正在使用im4java与Image Magick集成。 代码如下:
public void compressImage(String imageSource, String destinationPath) throws IOException, InterruptedException,
IM4JavaException {
ConvertCmd cmd = getCommand();
// create the operation, add images and operators/options
IMOperation op = new IMOperation();
op.strip();
op.interlace();
op.addRawArgs(compressionRawArguments);
op.gaussianBlur(compressionGaussianBlur);
op.quality(compressedImageQuality);
op.addImage(imageSource); // source file
op.addImage(destinationPath); // destination file
// execute the operation
cmd.run(op);
}
imageSource和destination都是使用java创建的临时文件。我已经检查过imageSource文件的大小是否正确,但在运行此代码后,目标文件的大小始终为0 Kb
请告知我可能做错了什么
共 (0) 个答案