You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Bruno P. Kinoshita (JIRA)" <ji...@apache.org> on 2017/08/06 10:52:03 UTC
[jira] [Commented] (IMAGING-198) Error while parsing JPEG with EXIF
metadata with Imaging 1.0 (Sony DSC-R1)
[ https://issues.apache.org/jira/browse/IMAGING-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16115758#comment-16115758 ]
Bruno P. Kinoshita commented on IMAGING-198:
--------------------------------------------
Can you share your code? Right now with:
{code:java}
public class TTT {
public static void main(String[] args) throws Exception {
Debug.debug();
File imageFile = new File("/home/kinow/Downloads/AfG9v9q.jpg");
final BufferedImage image = Imaging.getBufferedImage(imageFile, Collections.<String, Object>emptyMap());
System.out.println(image);
ByteSource byteSource = new ByteSourceFile(imageFile);
new JpegUtils().dumpJFIF(byteSource);
final JpegImageMetadata metadata = (JpegImageMetadata) Imaging.getMetadata(imageFile);
System.out.println(metadata);
}
}
{code}
I get:
{noformat}
9 markers
BufferedImage@4222023a: 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: ffe0 (JFIF_MARKER), 14 bytes of segment data.
Segment marker: ffee (JPEG_APP14_MARKER), 12 bytes of segment data.
Segment marker: ffdb (DQT_MARKER), 65 bytes of segment data.
Segment marker: ffdb (DQT_MARKER), 65 bytes of segment data.
Segment marker: ffc0 (SOF0_MARKER), 15 bytes of segment data.
Segment marker: ffc4 (SOF4_MARKER), 26 bytes of segment data.
Segment marker: ffc4 (SOF4_MARKER), 72 bytes of segment data.
Segment marker: ffc4 (SOF4_MARKER), 24 bytes of segment data.
Segment marker: ffc4 (SOF4_MARKER), 51 bytes of segment data.
SOS marker. 30662 bytes of image data.
9 markers
null
{noformat}
And opening the image downloaded from imgur with `imagemagick` I get:
{noformat}
$ identify -verbose AfG9v9q.jpg
Image: AfG9v9q.jpg
Format: JPEG (Joint Photographic Experts Group JFIF format)
Mime type: image/jpeg
Class: DirectClass
Geometry: 450x300+0+0
Units: Undefined
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: Undefined
Properties:
date:create: 2017-08-06T22:36:43+12:00
date:modify: 2017-08-06T22:36:43+12:00
jpeg:colorspace: 2
jpeg:sampling-factor: 1x1,1x1,1x1
signature: 5806dcbfe150f04b1d178234019436ebbc935a2f25707dd0843f65ab748dfa74
Artifacts:
filename: AfG9v9q.jpg
verbose: true
Tainted: False
Filesize: 31KB
Number pixels: 135K
Pixels per second: 0B
User time: 0.000u
Elapsed time: 0:01.000
Version: ImageMagick 6.8.9-9 Q16 x86_64 2017-07-31 http://www.imagemagick.org
{noformat}
So it looks like `imagemagick` also fails to locate any EXIT metadata in that JPEG? And I didn't get any exceptions or errors, but maybe our code are not doing the same thing?
Cheers
Bruno
> 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
>
> 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)