Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 92302 invoked from network); 20 Nov 2009 12:28:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 Nov 2009 12:28:04 -0000 Received: (qmail 74037 invoked by uid 500); 20 Nov 2009 12:28:03 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 73928 invoked by uid 500); 20 Nov 2009 12:28:03 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 73918 invoked by uid 99); 20 Nov 2009 12:28:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Nov 2009 12:28:03 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Nov 2009 12:28:00 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 97AFA234C045 for ; Fri, 20 Nov 2009 04:27:39 -0800 (PST) Message-ID: <57715846.1258720059606.JavaMail.jira@brutus> Date: Fri, 20 Nov 2009 12:27:39 +0000 (UTC) From: "FG (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (SANSELAN-21) Fetching GPS Latitude Ref gets Interoperability Index instead of Reference MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SANSELAN-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780536#action_12780536 ] FG commented on SANSELAN-21: ---------------------------- confirmed, using geo1.jpg: IrfanView correctly extracts the GeoTags: GPS Version ID: 2.2.0.0 GPS Latitude Ref: N GPS Latitude: 47 49 2.29 GPS Longitude Ref: E GPS Longitude: 11, 36, 40.114 while Sanselan produces the following output GPS Version ID: Not Found. GPS Latitude Ref: 'R98' <- should be N? GPS Latitude: 48, 49, 48, 48<- should be 47 49 2.29? GPS Longitude Ref: 'E' GPS Longitude: 11, 36, 40114/1000 (40,114) static void getLocation(File file) throws IOException, ImageReadException { IImageMetadata metadata = Sanselan.getMetadata(file); if (metadata instanceof JpegImageMetadata) { JpegImageMetadata jpegMetadata = (JpegImageMetadata) metadata; for (TagInfo ti : GPSTagConstants.ALL_GPS_TAGS) { TiffField field = jpegMetadata.findEXIFValue(ti); if (field != null) { System.out.println(ti.name + ": " + field.getValueDescription()); } } } } > Fetching GPS Latitude Ref gets Interoperability Index instead of Reference > -------------------------------------------------------------------------- > > Key: SANSELAN-21 > URL: https://issues.apache.org/jira/browse/SANSELAN-21 > Project: Commons Sanselan > Issue Type: Bug > Affects Versions: 0.94-incubator > Environment: Windows XP SP3, java version "1.5.0_17" > apache-sanselan-incubating-0.97-bin.zip > Reporter: Christian Junk > Priority: Minor > Attachments: geo1.jpg, R0013102.jpg > > > When testing the following example > https://svn.apache.org/repos/asf/incubator/sanselan/trunk/src/test/java/org/apache/sanselan/sampleUsage/MetadataExample.java > with apache-sanselan-incubating-0.97 it always stops working throwing a ClassCastException. It seems, that the line > TiffField gpsLatitudeRefField = jpegMetadata > .findEXIFValue(TiffConstants.GPS_TAG_GPS_LATITUDE_REF); > returns the Interoperability Index (R98) instead of the GPS Latitude Ref. > XResolution: 72 > Date Time: '2008:07:23 18:19:58' > Date Time Original: '2008:07:23 10:05:21' > Create Date: '2008:07:23 10:05:21' > ISO: 64 > Shutter Speed Value: Not Found. > Aperture Value: 6 > Brightness Value: 81/10 (8,1) > GPS Latitude Ref: 'R98' <------------------------------------ !!!!!!! > GPS Latitude: 48, 49, 48, 48 > GPS Longitude Ref: 'E' > GPS Longitude: 6, 38, 2061/100 (20,61) > GPS Description: [GPS. Latitude: 49 degrees, 45 minutes, 34,18 seconds N, Longitude: 6 degrees, 38 minutes, 20,61 seconds E] > > Exception in thread "main" java.lang.ClassCastException: [B > at com.alta4.phasr.MetadataExample.metadataExample(MetadataExample.java:113) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.