Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法在java中将原始图像文件(*.ARW)转换为jpg_Java_Image Processing_Image Conversion - Fatal编程技术网

无法在java中将原始图像文件(*.ARW)转换为jpg

无法在java中将原始图像文件(*.ARW)转换为jpg,java,image-processing,image-conversion,Java,Image Processing,Image Conversion,我尝试使用jrawio和其他库,但无法将ARW原始图像文件转换为jpg。有人能帮忙吗 下面是我试图测试的代码: BufferedImage image= ImageIO.read(new File("d:/sony_a500_05.arw")); ImageIO.write(image, "jpg", new File("d:/a.jpg")); 获得此异常: Exception in thread "main" java.util.NoSuchElementException

我尝试使用jrawio和其他库,但无法将ARW原始图像文件转换为jpg。有人能帮忙吗

下面是我试图测试的代码:

    BufferedImage image= ImageIO.read(new File("d:/sony_a500_05.arw"));
    ImageIO.write(image, "jpg", new File("d:/a.jpg"));
获得此异常:

Exception in thread "main" java.util.NoSuchElementException: No tags with key = SRF2 Key
    at it.tidalwave.imageio.raw.Directory.getInteger(Directory.java:587)
    at it.tidalwave.imageio.srf.SonySRFMakerNoteSupport.getSRF2Key(SonySRFMakerNoteSupport.java:34)
    at it.tidalwave.imageio.srf.SonyMakerNote.loadAll(SonyMakerNote.java:120)
    at it.tidalwave.imageio.tiff.TIFFImageReaderSupport.processMakerNote(TIFFImageReaderSupport.java:447)
    at it.tidalwave.imageio.tiff.TIFFImageReaderSupport.processEXIFAndMakerNote(TIFFImageReaderSupport.java:404)
    at it.tidalwave.imageio.tiff.TIFFImageReaderSupport.processMetadata(TIFFImageReaderSupport.java:380)
    at it.tidalwave.imageio.raw.RAWImageReaderSupport.loadMetadata(RAWImageReaderSupport.java:591)
    at it.tidalwave.imageio.raw.RAWImageReaderSupport.ensureMetadataIsLoaded(RAWImageReaderSupport.java:520)
    at it.tidalwave.imageio.tiff.TIFFImageReaderSupport.loadImage(TIFFImageReaderSupport.java:186)
    at it.tidalwave.imageio.raw.RAWImageReaderSupport.read(RAWImageReaderSupport.java:131)
    at javax.imageio.ImageIO.read(Unknown Source)
    at javax.imageio.ImageIO.read(Unknown Source)
    at test3.main(test3.java:42)
从以下URL获取了一个示例arw文件:

那是什么arw文件?imageio不支持这一点-你需要找到格式并单独阅读-如果你还没有找到库,你应该尝试更标准的格式。。。或者要求索尼提供自己的读者。这个页面(可能已经过时)似乎暗示ARW只支持某些相机@gpasch:ARW是一个由索尼公司生产的原始图像文件camera@leonbloy:索尼有自己的驱动程序来读取这些类型的文件,是否可以将其与java链接?