Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CFB6E105FA for ; Mon, 27 Apr 2015 10:52:08 +0000 (UTC) Received: (qmail 51665 invoked by uid 500); 27 Apr 2015 10:52:08 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 51533 invoked by uid 500); 27 Apr 2015 10:52:07 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 51522 invoked by uid 99); 27 Apr 2015 10:52:07 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Apr 2015 10:52:07 +0000 Received: from mail-ig0-f170.google.com (mail-ig0-f170.google.com [209.85.213.170]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 8876C1A0A57 for ; Mon, 27 Apr 2015 10:52:07 +0000 (UTC) Received: by igbhj9 with SMTP id hj9so58265662igb.1 for ; Mon, 27 Apr 2015 03:52:06 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.42.188.19 with SMTP id cy19mr11751638icb.92.1430131926756; Mon, 27 Apr 2015 03:52:06 -0700 (PDT) Received: by 10.64.85.69 with HTTP; Mon, 27 Apr 2015 03:52:06 -0700 (PDT) In-Reply-To: <5537BF2B.8040901@llgc.org.uk> References: <5537BF2B.8040901@llgc.org.uk> Date: Mon, 27 Apr 2015 12:52:06 +0200 Message-ID: Subject: Re: [sanselan] Writing TIFF back to a file From: Benedikt Ritter To: Commons Users List Content-Type: multipart/alternative; boundary=20cf301fb7fb79f51f0514b289f6 --20cf301fb7fb79f51f0514b289f6 Content-Type: text/plain; charset=UTF-8 Hello Remi, based on your second question I assume you have managed to resolve this problem yourself? br, Benedikt 2015-04-22 17:32 GMT+02:00 Remi Malessa : > Hi there, > > I am starting my work with Sanselan. I am trying to remove a Tag from a > TIFF file. > I managed to find the Tag and probably remove it too. Here's the code: > > IImageMetadata tMetadata = Sanselan.getMetadata(tInputFile); > TiffImageMetadata tiffMetadata = (TiffImageMetadata) tMetadata; > outputSet = tiffMetadata.getOutputSet(); > TiffOutputDirectory exifDirectory = outputSet.getExifDirectory(); > > exifDirectory.removeField(TiffConstants.EXIF_TAG_FOCAL_PLANE_RESOLUTION_UNIT); > > ...but now, I can't make it to save it to the system. I am trying > something like this: > > TiffImageWriterLossless writerLossLess = new > TiffImageWriterLossless(imageBytes); > writerLossLess.write(new FileOutputStream(toutputFile), outputSet); > > ...but I don't know where to get the data for the "imagesBytes". > > Would much appreciate a hint. > > Thanks > > Remi > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org > For additional commands, e-mail: user-help@commons.apache.org > > -- http://people.apache.org/~britter/ http://www.systemoutprintln.de/ http://twitter.com/BenediktRitter http://github.com/britter --20cf301fb7fb79f51f0514b289f6--