[magick-users] Converting TIFF files

Kevin Myers kmyers at procominc.net
Thu Jul 12 14:37:38 PDT 2007


Here is the contents of a simple .BAT file that I run under Windows using 
IM's convert command to split multipage TIFF files:

@echo off
for %%f in (%1) do convert "%%f" "%%~nf-%%02d.tif"

Put that in a file called tiffsplit.bat, and run it like something like 
this:

tiffsplit "c:\pathtoyourfiles\*.tif"

Maybe that will be enough to get you started.

There is also a simpler (and faster) utility designed for this specific 
purpose that you can download as part of the GnuWin32 libtiff binary package 
for Windows.  It is also called tiffsplit.

HTH,
s/KAM


----- Original Message ----- 
From: "Ian Docherty" <magick at iandocherty.com>
To: <magick-users at imagemagick.org>
Sent: Thursday, July 12, 2007 15:21
Subject: [magick-users] Converting TIFF files


> Hi
> I have a large number (about 2500) TIFF images, many of which are 
> multi-page images and I need to extract each image and save it as a new 
> file, also in TIFF.
>
> I note that although Image Magick supports TIFF there is not much 
> information on how to do this.
>
> If coding is required I would probably do this in Perl using the CPAN 
> Image::Magick module.
>
> Since I am just starting out with IM I was hoping that I could be pointed 
> at a few resources that would help me on my way.
>
> I have installed Image Magick onto my windows system together with 
> Image::Magick for Active State Perl.
>
> I have the following perl program.
>
> use strict;
> use Data::Dumper;
>
> use Image::Magick;
>
> my $image = new Image::Magick;
> open(IMAGE, 'image0.tif');
> $image->Read(file=>\*IMAGE);
> close(IMAGE);
>
> But when I run it I get the error 'perl.exe has generated errors and will 
> be closed by Windows'
>
> Regards
> Ian Docherty
> _______________________________________________
> Magick-users mailing list
> Magick-users at imagemagick.org
> http://studio.imagemagick.org/mailman/listinfo/magick-users
> 




More information about the Magick-users mailing list