Received: from mailgate002.isp.belgacom.be (mailgate002.isp.belgacom.be [195.238.6.87])
	by maildelivery008.isp.belgacom.be (Postfix) with ESMTP id 8C3E226C03C
	for <joris.at.lebbeke@skynet.be>; Fri, 25 Jan 2008 10:43:22 +0100 (CET)
Authentication-Results: in.mx.skynet.be; dkim=neutral (message not signed) header.i=none
Received: from unknown (HELO duke.maptools.org) ([209.217.116.153])
  by in.mx.skynet.be with ESMTP; 25 Jan 2008 10:43:21 +0100
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id m0P9PpBB012527;
	Fri, 25 Jan 2008 04:26:37 -0500
Received: from web26205.mail.ukl.yahoo.com (web26205.mail.ukl.yahoo.com
	[217.12.10.242])
	by duke.maptools.org (8.12.11/8.12.10) with SMTP id m0P9PcT7012524
	for <tiff@lists.maptools.org>; Fri, 25 Jan 2008 04:25:39 -0500
Received: (qmail 72335 invoked by uid 60001); 25 Jan 2008 09:25:27 -0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.it;
	h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID;
	b=ekmSBv9+EC9rjjcb6XNmOYzzFbVZ06ldqE8IQRHxkAtp2C7tTnoEk0+x3VYeAX+7Cqmn1cAD7/PcwWyhZwOkc8fyQV6L1RMRaTA2yVXt2OgVpGN2nWujSmnx4j73IauRqXrnS06OIIUQJX9+P2GCFNjsiEmH1o0Mw86VC8kH1PM=;
X-YMail-OSG: 5FGUfygVM1lRJLiWfnjW1LXzwyEWEW1RoZ7TNcqHmmKCDuuGRFM_2BaA11u4tG6euPZUqTIb0jhc52Zk3Ytede8zQqyt5IqAZ6duIZMZDGI2bd6V
Received: from [88.43.105.1] by web26205.mail.ukl.yahoo.com via HTTP;
	Fri, 25 Jan 2008 10:25:27 CET
Date: Fri, 25 Jan 2008 10:25:27 +0100 (CET)
From: beppe costagliola <beppecosta@yahoo.it>
Subject: Re: [Tiff] Tiffcrop and tiff2pdf
To: Richard Nolde <nrichard8@qwest.net>, tiff@lists.maptools.org
In-Reply-To: <4799790F.50203@qwest.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Message-ID: <801459.72035.qm@web26205.mail.ukl.yahoo.com>
Cc: 
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
Content-Transfer-Encoding: quoted-printable
X-UIDL: 000000000023ceae.00002a22
X-MSP-STORE: Fri, 25 Jan 2008 10:43:22 +0100
Status:   

Hi Richard,

thanks for your suggestions.

I've tried in both ways.

-m 1200,100,1804,876 gives a cropped image (no problem
in calculating the -m values at runtime, because we
already do this)=20

-m 1200,100 -X 1500 -Y 500 produces a distorted image
with a size double of the original !

I will keep on trying the first option.

At present we use Imagemagick (convert -crop) but
because it runs on a iSeries platform the command is
executed via a rs/6000 interpreter.

While I can run tifflib with their tools (including
tiffcrop) in C native mode.

Note that we have to run this command more than
150,000 times per day and the performance is a real
issue.

PS. Do you know of a barcode reader available in open
source ?

Thanks.
Giuseppe. =20

.

--- Richard Nolde <nrichard8@qwest.net> ha scritto:

>   1. Re: TIffcrop might be called tiffextract (Andy
> Cave)
> >> Please, note that tiffcrop is a part of libtiff
> for quite a some time
> >> (and it is part of stable branch of libtiff) and
> probably already is
> >> being used in scripts or called from programs, so
> it is not harmless to
> >> change its name. But everything is possible with
> a good reason, of
> >> course.
> >>
> >> Best regards,
> >> Andrey
> > Andrey's point is well taken. I originally
> proposed that the code that=20
> > is now tiffcrop should replace tiffcp since it is
> a superset of the=20
> > tiffcp utiltity, but Frank Warmerdam rightly noted
> that tiffcp was far=20
> > to important to take a change on breaking and
> certainly no=20
> > functionality should be removed. I started
> exploring with a simple=20
> > crop option and it grew from there. I will try to
> check out the CVS=20
> > version soon as I think there may be half a dozen
> more options that I=20
> > have added since the 3.8.2 release. A quick check
> of my source shows=20
> > options for breaking pages into X columns by Y
> rows, or various Page=20
> > sizes, eg Letter, Legal, etc (which are useful for
> document processing=20
> > but not meaningful for abstract images unless you
> just happen to want=20
> > to print a huge image on sheets of a given size),
> output orientations=20
> > of portrait, landscape, auto, ouput margins added
> to pages rather than=20
> > subtracted from the original, and the ability to
> specify new X and Y=20
> > resolution tags. These were not in the original
> release so I will have=20
> > to see if they made it into CVS before the 3.9.0
> branch.  One warning=20
> > to users of the old version.  In order to
> accomodate the new flags,=20
> > the case of the old flags has changed in some
> cases so you will want=20
> > to check your scripts for compatability before
> upgrading.
> > Anyone is free to provide a symlink with a more
> appropriate name for=20
> > their particular installation. Tiffcrop it shall
> remain.
> >
> > 3. How to clip an image with Tiffcrop (beppe
> costagliola)
> >
> >
>
----------------------------------------------------------------------
> > There are actually two ways to do this. First you
> must specify your=20
> > units as pixels with the -U px option. Second
> specify your reference=20
> > edge for the measurements -E top. Third, specify
> the margins you want=20
> > to subtract (clip/crop/remove) from the original
> that will not be=20
> > copied to the new image. The margins MUST be
> specified in the=20
> > following order and separate only by commas, top,
> left, bottom, right.=20
> > -m 1200,100,1804,876. This should leave an opening
> 1500 x 500 between=20
> > the margins but the right and bottom margins are
> rather a pain to=20
> > compute and will cause problems if your images
> vary in size. You can=20
> > use the flags for a fixed size region, -X 1500 -Y
> 500 with only the=20
> > first two margins and tiffcrop will compute the
> proper region and=20
> > ignore anything to the right and below the
> selected region if you only=20
> > need to select a single region from each image.
> Note that  This would=20
> > give you a command line something like this:
> tiffcrop -E top -U px -m 1200,100 -X 1500 -Y 500
> source.tif destination.tif
>=20
> Note: Units must come first to override the values
> found in the tiff=20
> file. Margins are calculated in the current units,
> eg actually pixels=20
> for px, or inches, or centimeters but the later two
> require that the=20
> file have a valid resolution for both dimensions.
> The units in which you=20
> specify the margins or any dimensions for X and Y,
> are independent of=20
> the units that might be stored (or defaulted) in the
> file. Tiffcrop=20
> converts between the internal units specified in the
> file to the type of=20
> units you specify on the command line before it
> calculates which pixels=20
> to select. Any margins not specified are assumed to
> be zero.
>=20
> If you want to select more than one region within
> the cropped borders,=20
> you can use the -Z option and the regions will be
> computed AFTER the=20
> margins are subtracted.
>=20
> Richard Nolde
> >
> >
> > ------------------------------
> >
> > Message: 3
> > Date: Thu, 24 Jan 2008 17:09:23 +0100 (CET)
> > From: beppe costagliola <beppecosta@yahoo.it>
> > Subject: [Tiff] How to clip an image with Tiffcrop
> > To: tiff@lists.maptools.org
> > Message-ID:
> <218112.46229.qm@web26205.mail.ukl.yahoo.com>
> > Content-Type: text/plain; charset=3Diso-8859-1
> >
> > Tiffcrop seems to work fine but I don't understand
> the
> > parameters that should be passed to.
> >
> > For example:
> >
> > I have an image with ImageWidth =3D 2476 and
> ImageLength
> > =3D 3504
> >
> > I would like to extract an area that is at X =3D 100
> and
> >
> > Y =3D 1200 giving an image of Width =3D 1500 and
> Lenght =3D
> > 500.
> >
> > Thanks.
> >
> _______________________________________________
> Tiff mailing list: Tiff@lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/tiff
> http://www.remotesensing.org/libtiff/
>=20



      ___________________________________=20
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail:=
 http://it.docs.yahoo.com/nowyoucan.html
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
