incubator-sanselan-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles Matthew Chen" <charlesmc...@gmail.com>
Subject Re: EXIF on Jpeg brings Out Of Memory
Date Tue, 10 Jun 2008 15:30:49 GMT
Hi Christian,

   Can you please send me a sample image that reproduces this issue?

Thanks,
   Charles.


On Tue, Jun 10, 2008 at 3:42 PM, Christian Grobmeier
<grobmeier@gmail.com> wrote:
> Hi all,
>
> i want to use Sanselan for extracting EXIF information.
> This code:
>
>   IImageMetadata metadata = Sanselan.getMetadata(jpegFile);
>   JpegImageMetadata jpgmd = (JpegImageMetadata)metadata;
>   TiffField field =
> jpgmd.findEXIFValue(TiffConstants.EXIF_TAG_ORIENTATION);
>
> Gives me an out of memor exception, after a second. My image ist just 150 kb
> big.
> Unfortunatly there is no JPEGConstants.EXIF_TAG_ORIENTATION or similar.
> Any ideas why that happens?
>
> And a second question: how is the state of writing EXIF tags to jpeg?
> Thanks in advance
> Chris.
>
>
> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>    at
> org.cmc.sanselan.common.byteSources.ByteSourceArray.getBlock(ByteSourceArray.java:51)
>    at
> org.cmc.sanselan.formats.tiff.TiffField.fillInValue(TiffField.java:356)
>    at
> org.cmc.sanselan.formats.tiff.TiffReader.readDirectory(TiffReader.java:164)
>    at
> org.cmc.sanselan.formats.tiff.TiffReader.readDirectory(TiffReader.java:105)
>    at
> org.cmc.sanselan.formats.tiff.TiffReader.readDirectories(TiffReader.java:96)
>    at org.cmc.sanselan.formats.tiff.TiffReader.read(TiffReader.java:416)
>    at
> org.cmc.sanselan.formats.tiff.TiffReader.readContents(TiffReader.java:406)
>    at
> org.cmc.sanselan.formats.tiff.TiffImageParser.getMetadata(TiffImageParser.java:127)
>    at org.cmc.sanselan.ImageParser.getMetadata(ImageParser.java:82)
>    at
> org.cmc.sanselan.formats.jpeg.JpegImageParser.getExifMetadata(JpegImageParser.java:376)
>    at
> org.cmc.sanselan.formats.jpeg.JpegImageParser.getMetadata(JpegImageParser.java:314)
>    at org.cmc.sanselan.Sanselan.getMetadata(Sanselan.java:697)
>    at org.cmc.sanselan.Sanselan.getMetadata(Sanselan.java:689)
>    at org.cmc.sanselan.Sanselan.getMetadata(Sanselan.java:667)
>    at de.grobmeier.imgtools.Rotator.main(Rotator.java:74)
>

Mime
View raw message