0

I tried using jrawio and other lib but couldn't convert an ARW raw image file to jpg. Can anybody help ?

Below was the code which I tried to test :

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

Got this Exception :

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)

Took a sample arw file from below URL : http://www.photographyblog.com/reviews/sony_a500_review/sample_images/

ilse2005
  • 11,189
  • 5
  • 51
  • 75
Yash Khare
  • 355
  • 2
  • 10
  • what is that arw file? imageio dont support that - you need to find the format and read it individually - if you havent found a library already – gpasch Feb 27 '16 at 23:18
  • You should try a more standard format... or ask Sony to provide their own readers. This page (probably outdated) seems to imply that ARW is only supported for some cameras http://jrawio.rawdarkroom.org/supported-cameras/ – leonbloy Feb 27 '16 at 23:25
  • @gpasch : arw is a raw image file generated from a Sony camera – Yash Khare Feb 28 '16 at 09:01
  • @leonbloy : sony is having its own driver for reading these type of files , is it possible to link it with java ? – Yash Khare Feb 28 '16 at 09:06

0 Answers0