Tugger the SLUGger!SLUG Mailing List Archives

Re: [slug-chat] Trimming a tiff file


On Thu, 5 Apr 2001 waratah@xxxxxxxxxx wrote:

>
> help...
>
> I need to trim a fixed amount of the top of a TIFF file (say 60mm) and then
> resave it as a valid tiff file.   I am a total novice on graphics.   How would
> I do this for many many files.
>
> It might be nice to apply some filtering on the image as well.  What options
> are available.

This will do it and a heck of a lot more. Convert is part of ImageMagick.

convert(1)                                             convert(1)

NAME
       convert - converts an input file using one image format to
       an output file with the same or differing image format.

SYNOPSIS
       convert [ options ... ] file [ file... ] file

DESCRIPTION
       convert converts an input file using one image  format  to
       an output file with the same or differing image format.

<snip>

OPTIONS

<snip>

	crop <width>x<height>{+-}<x offset>{+-}<y offset>{%}
              preferred size and location of the  cropped  image.
              See   X(1)   for   details   about   the   geometry
              specification.

              To specify a percentage width  or  height  instead,
              append  %.   For  example  to crop the image by ten
              percent on all sides of the image, use -crop 10%.

              Omit the x and y offset to  generate  one  or  more
              subimages of a uniform size.

              Use cropping to crop a particular area of an image.
              Use -crop 0x0 to trim edges that are the background
              color.  Add an x and y offset to leave a portion of
              the trimmed edges with the image.

> This is a project for a friend who can pay, this may be farmed out so
> reasonable offers listened to.

Free. Just ask on SLUG what the shortest command can be used to convert
muliple files at a time. You will get 10 responses of working commands
<grin>.

Rodos