[ https://issues.apache.org/jira/browse/IMAGING-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16116050#comment-16116050 ]
Bruno P. Kinoshita commented on IMAGING-198: -------------------------------------------- Thanks Samuel. I can open the image in Ristretto Image Viewer, and ImageMagick Viewer with no problem. Also `identify -verbose` gives me: {noformat} $ identify -verbose 99f.jpg Image: 99f.jpg Format: JPEG (Joint Photographic Experts Group JFIF format) Mime type: image/jpeg Class: DirectClass Geometry: 450x300+0+0 Resolution: 72x72 Print size: 6.25x4.16667 Units: PixelsPerInch Type: TrueColor Endianess: Undefined Colorspace: sRGB Depth: 8-bit Channel depth: red: 8-bit green: 8-bit blue: 8-bit Channel statistics: Pixels: 135000 Red: min: 0 (0) max: 255 (1) mean: 103.54 (0.406038) standard deviation: 43.3321 (0.16993) kurtosis: 0.192375 skewness: 0.467772 Green: min: 0 (0) max: 255 (1) mean: 137.895 (0.540765) standard deviation: 38.3529 (0.150404) kurtosis: 1.76938 skewness: -1.00735 Blue: min: 0 (0) max: 255 (1) mean: 158.757 (0.622578) standard deviation: 48.5938 (0.190564) kurtosis: 3.59129 skewness: -2.1135 Image statistics: Overall: min: 0 (0) max: 255 (1) mean: 133.397 (0.523127) standard deviation: 43.6271 (0.171087) kurtosis: 1.48121 skewness: -0.964212 Rendering intent: Perceptual Gamma: 0.454545 Chromaticity: red primary: (0.64,0.33) green primary: (0.3,0.6) blue primary: (0.15,0.06) white point: (0.3127,0.329) Background color: white Border color: srgb(223,223,223) Matte color: grey74 Transparent color: black Interlace: None Intensity: Undefined Compose: Over Page geometry: 450x300+0+0 Dispose: Undefined Iterations: 0 Compression: JPEG Quality: 86 Orientation: TopLeft Properties: date:create: 2017-08-07T10:13:04+12:00 date:modify: 2017-08-07T10:13:01+12:00 exif:BitsPerSample: 8, 8, 8 exif:ColorSpace: 1 exif:ComponentsConfiguration: 0 exif:CompressedBitsPerPixel: 8/1 exif:Contrast: 2 exif:Copyright: exif:CustomRendered: 0 exif:DateTime: 2009-02-09T11:54:31+01:00 exif:DateTimeDigitized: 2007:02:17 22:49:04 exif:DateTimeOriginal: 2007:02:17 22:49:04 exif:ExifImageLength: 300 exif:ExifImageWidth: 450 exif:ExifOffset: 312 exif:ExifVersion: 48, 50, 50 exif:ExposureBiasValue: 0/10 exif:ExposureMode: 0 exif:ExposureProgram: 2 exif:ExposureTime: 10/6400 exif:FileSource: 3 exif:Flash: 0, 0, 3, 3, 3 exif:FlashPixVersion: 48, 49, 48 exif:FNumber: 80/10 exif:FocalLength: 187/10 exif:ImageDescription: exif:ISOSpeedRatings: 160 exif:JPEGInterchangeFormat: 2778 exif:JPEGInterchangeFormatLength: 9128 exif:LightSource: 0 exif:Make: SONY exif:MaxApertureValue: 47/16 exif:MeteringMode: 5 exif:Model: DSC-R1 exif:Orientation: 1 exif:ResolutionUnit: 2 exif:SamplesPerPixel: 3 exif:Saturation: 0 exif:SceneCaptureType: 0 exif:SceneType: 1 exif:Sharpness: 0 exif:Software: ImageReady exif:WhiteBalance: 0 exif:XResolution: 72/1 exif:YCbCrPositioning: 2 exif:YResolution: 72/1 jpeg:colorspace: 2 jpeg:sampling-factor: 1x1,1x1,1x1 signature: 5806dcbfe150f04b1d178234019436ebbc935a2f25707dd0843f65ab748dfa74 Profiles: Profile-app12: 85 bytes Profile-exif: 764 bytes Artifacts: filename: 99f.jpg verbose: true Tainted: False Filesize: 31.9KB Number pixels: 135K Pixels per second: 13.5MB User time: 0.000u Elapsed time: 0:01.009 Version: ImageMagick 6.8.9-9 Q16 x86_64 2017-07-31 http://www.imagemagick.org {noformat} But running the same code I mentioned in my previous comment, I get: {noformat} 6 markers BufferedImage@123acf34: type = 1 DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0 IntegerInterleavedRaster: width = 450 height = 300 #Bands = 3 xOff = 0 yOff = 0 dataOffset[0] 0 Segment marker: ffe1 (JPEG_APP1_MARKER), 764 bytes of segment data. Segment marker: ffec (Unknown), 85 bytes of segment data. Segment marker: ffee (JPEG_APP14_MARKER), 12 bytes of segment data. Segment marker: ffdb (DQT_MARKER), 130 bytes of segment data. Segment marker: ffc0 (SOF0_MARKER), 15 bytes of segment data. Segment marker: ffc4 (SOF4_MARKER), 173 bytes of segment data. SOS marker. 30678 bytes of image data. 6 markers Exception in thread "main" java.io.IOException: Could not read block (block start: 2778, block length: -2020, data length: 758). at org.apache.commons.imaging.common.bytesource.ByteSourceArray.getBlock(ByteSourceArray.java:46) at org.apache.commons.imaging.formats.tiff.TiffReader.getJpegRawImageData(TiffReader.java:489) at org.apache.commons.imaging.formats.tiff.TiffReader.readDirectory(TiffReader.java:218) at org.apache.commons.imaging.formats.tiff.TiffReader.readDirectory(TiffReader.java:118) at org.apache.commons.imaging.formats.tiff.TiffReader.readDirectories(TiffReader.java:111) at org.apache.commons.imaging.formats.tiff.TiffReader.read(TiffReader.java:416) at org.apache.commons.imaging.formats.tiff.TiffReader.readContents(TiffReader.java:408) at org.apache.commons.imaging.formats.tiff.TiffImageParser.getMetadata(TiffImageParser.java:123) at org.apache.commons.imaging.ImageParser.getMetadata(ImageParser.java:220) at org.apache.commons.imaging.formats.jpeg.JpegImageParser.getExifMetadata(JpegImageParser.java:358) at org.apache.commons.imaging.formats.jpeg.JpegImageParser.getMetadata(JpegImageParser.java:315) at org.apache.commons.imaging.Imaging.getMetadata(Imaging.java:1086) at org.apache.commons.imaging.Imaging.getMetadata(Imaging.java:1079) at org.apache.commons.imaging.Imaging.getMetadata(Imaging.java:1054) at org.apache.commons.imaging.TTT.main(TTT.java:23) {noformat} > Error while parsing JPEG with EXIF metadata with Imaging 1.0 (Sony DSC-R1) > -------------------------------------------------------------------------- > > Key: IMAGING-198 > URL: https://issues.apache.org/jira/browse/IMAGING-198 > Project: Commons Imaging > Issue Type: Bug > Components: Format: JPEG > Affects Versions: 1.0 > Environment: Windows and Java 7u80 > Reporter: Samuel > Labels: EXIF, JPEG > Attachments: 99f.jpg > > > An example of a JPEG image with EXIF metadata, coming from a Sony DSC-R1 > camera, that will not be parsed with commons-imaging 1.0. > http://imgur.com/a/fl9D9 -- This message was sent by Atlassian JIRA (v6.4.14#64029)