Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 27310 invoked from network); 6 Mar 2010 20:51:06 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Mar 2010 20:51:06 -0000 Received: (qmail 2377 invoked by uid 500); 6 Mar 2010 20:50:48 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 2195 invoked by uid 500); 6 Mar 2010 20:50:48 -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 2186 invoked by uid 99); 6 Mar 2010 20:50:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Mar 2010 20:50:48 +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; Sat, 06 Mar 2010 20:50:47 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4588E234C48D for ; Sat, 6 Mar 2010 20:50:27 +0000 (UTC) Message-ID: <602542567.119771267908627283.JavaMail.jira@brutus.apache.org> Date: Sat, 6 Mar 2010 20:50:27 +0000 (UTC) From: "FG (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (SANSELAN-37) Wrinting unmodified EXIF-Data to new image changes values In-Reply-To: <1172192637.119751267908507297.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SANSELAN-37?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] FG updated SANSELAN-37: ----------------------- Attachment: out.jpg src2.jpg src1.jpg Input images and output image as it was created by my code. Images were opened in Irfanview and resized to ~1x1 pixel to reduce the sample. Exif data was preserved in the first image. src2 was saved via IrfanView with the option to remove all EXIF data. > Wrinting unmodified EXIF-Data to new image changes values > --------------------------------------------------------- > > Key: SANSELAN-37 > URL: https://issues.apache.org/jira/browse/SANSELAN-37 > Project: Commons Sanselan > Issue Type: Bug > Affects Versions: 0.94-incubator > Environment: Canon Powershot A570 IS > Reporter: FG > Attachments: out.jpg, src1.jpg, src2.jpg > > > I used the following code, which just reads the EXIF data from a picture of a Canon Powershot A570 IS and writes it back to another file without modifying it: > File src1 = new File("c:/temp/src1.jpg"); > File src2 = new File("c:/temp/src2.jpg"); > File dst = new File("c:/temp/out.jpg"); > IImageMetadata metadata = Sanselan.getMetadata(src1); > TiffImageMetadata exif = ((JpegImageMetadata) metadata).getExif(); > TiffOutputSet outputSet = exif.getOutputSet(); > OutputStream os = new BufferedOutputStream(new FileOutputStream(dst)); > new ExifRewriter().updateExifMetadataLossless(src2, os, outputSet); > os.close(); > src1.jpg is a file with EXIF data > src2.jpg is src1.jpg without EXIF data (saved it with IrfanView and unchecked the appropriate checkboxes in the Jpeg Save Dialog) > out.jpg should contain the EXIF information after the code was run. > Actually the EXIF data is not the same after the call. > So, is there anything wrong with the above code or with the images or is > this a bug in Sanselan? > Tried the same with the image of a Sony Alpha 350. The effect was much less. > I try to attach the images and exif data in the next step. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.