Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D82EE9E1B for ; Thu, 26 Apr 2012 12:35:21 +0000 (UTC) Received: (qmail 32387 invoked by uid 500); 26 Apr 2012 12:35:21 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 32277 invoked by uid 500); 26 Apr 2012 12:35:21 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 32269 invoked by uid 99); 26 Apr 2012 12:35:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Apr 2012 12:35:21 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of damjan.jov@gmail.com designates 209.85.216.43 as permitted sender) Received: from [209.85.216.43] (HELO mail-qa0-f43.google.com) (209.85.216.43) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Apr 2012 12:35:16 +0000 Received: by qadb15 with SMTP id b15so394381qad.9 for ; Thu, 26 Apr 2012 05:34:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=hQs/jyPa6i9MWUpirFGsDv82onrCMJiWDOGHP1EldJE=; b=NvtuOekh8kjnpJCj+Dzm9iUOYDfOb89HtO4fk+wPbWj2QG62rRU7eeGQLSk7CtB6Ms 1CJePl/vtc4DyUb0KOhP8ogCAogGoJ1JUdxUsMZTr1dy3Tw9m4Qf6eYTyLYr5cftnkBx 8jR8ldLtK3rHji8+9jO9nT8dMoaYRXybllw104bVYosVFoV6pfLigOXqGYR9wN5hxFGE cGM8WOESJi4GDDJsWo68z3x6sBeiJyEfkE+QjX7TK1VXqRYnpii+hIsDQpZndC1Tta5q P57L61L2Oh8OQMteyTqQx0cDU+fu7mY8bMHl2qpa89Z0TceE71jKzIPfp7kZqp3yaECB 2Skg== Received: by 10.229.137.145 with SMTP id w17mr1499838qct.7.1335443695192; Thu, 26 Apr 2012 05:34:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.30.212 with HTTP; Thu, 26 Apr 2012 05:34:34 -0700 (PDT) In-Reply-To: <040a38b6-bf9e-4f46-a024-729f7cf29e45@sonalysts.com> References: <19d96013-8a0a-4199-af8a-5149686213c6@sonalysts.com> <040a38b6-bf9e-4f46-a024-729f7cf29e45@sonalysts.com> From: Damjan Jovanovic Date: Thu, 26 Apr 2012 14:34:34 +0200 Message-ID: Subject: Re: [sanselan] EXIF_TAG_MODIFY_DATE removed from new imaging package? To: Commons Developers List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Not your last one, the one before. It ends with: "One question. When I" and there's nothing after it. On Thu, Apr 26, 2012 at 2:31 PM, Gary Lucas wrote: > Excellent again! =A0 Much better. > > I'm not sure how that last email got cut short, but you've answered my qu= estion. =A0So thanks. > > > > g. > > > > -----Original Message----- > From: Damjan Jovanovic [mailto:damjan.jov@gmail.com] > Sent: Thursday, April 26, 2012 8:26 AM > To: Commons Developers List > Subject: Re: [sanselan] EXIF_TAG_MODIFY_DATE removed from new imaging pac= kage? > > On Thu, Apr 26, 2012 at 2:16 PM, Gary Lucas wrote= : >> >> Since we're on the subject, another question. =A0In encoding data, I was >> constructing field types and coding the information. =A0But it looks >> like you've got some static declarations for doing the same thing. >> Could you verify that the following is your intended approach >> >> =A0 =A0public TiffOutputField encodeASCII(TagInfo tInfo, String string) >> =A0 =A0 =A0 =A0 =A0 =A0throws ImageWriteException, =A0ImageWriteExceptio= n >> =A0 =A0{ >> =A0 =A0 =A0 =A0// =A0 =A0 =A0previous approach: >> =A0 =A0 =A0 =A0// =A0 =A0 =A0 =A0FieldType fType =3D new FieldTypeAscii(= 2, "ASCII"); >> =A0 =A0 =A0 =A0// =A0 =A0 =A0 =A0byte bytes[] =3D fType.writeData(string= , byteOrder); >> >> =A0 =A0 =A0 =A0byte bytes[] =3D FieldType.FIELD_TYPE_ASCII.writeData(str= ing, >> byteOrder); >> >> =A0 =A0 =A0 =A0TiffOutputField tiffOutputField =3D >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0new TiffOutputField( >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0tInfo.tag, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0tInfo, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0FieldType.FIELD_TYPE_ASCII, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bytes.length, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bytes); >> =A0 =A0 =A0 =A0return tiffOutputField; >> =A0 =A0} > > Do your emails keep getting cut short? > > The easiest way, for a known tag type, is: > > tiffOutputDirectory.add(TiffTagConstants.TIFF_TAG_DATE_TIME, > "2012-04-25 01:23:45"); > > which supports IDE code completion, and automatically overloads to the co= rrect method based on the tag type. > > For an unknown tag type, I think you have to use the old way where you co= nstruct a TiffOutputField yourself. > > Damjan > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org