#! /usr/bin/perl use Imager; my @im; my $tiffile = "./merged_image.tif"; unlink $tiffile; my @images = glob("./*.tif"); print @images, "\n"; my $i=0; for my $file (@images) { my $im = Imager->new(); $im->read(file=>$file) or die "$0: Cannot read image $file: ",$im->errstr,"\n"; my @alltags = $im->tags; foreach $tag ( @alltags ) { print $tag->[0], ":", $tag->[1], "\n"; } push(@im, $im); $i = $i + 1; } ## writing the above images to a single file Imager->write_multi({ type=>'tiff', file=>$tiffile, }, @im) or die "$0: cannot save to $output: ",$Imager::ERRSTR,"\n"; #checking merged image properties my $im = Imager->new(); $im->read(file=>$tiffile) or die "$0: Cannot read image $file: ",$im->errstr,"\n"; my @alltags = $im->tags; foreach $tag ( @alltags ) { print $tag->[0], ":", $tag->[1], "\n"; } Output: haikz@eidspstd99:/usr/home/shaikz ==> ./test2.pl ./009600209943_2.tif./009600209943_3.tif tiff_bitspersample:1 tiff_photometric:0 tiff_resolutionunit:2 tiff_resolutionunit_name:inch i_xres:200 i_yres:200 i_format:tiff tiff_compression:fax4 tiff_bitspersample:1 tiff_photometric:0 tiff_resolutionunit:2 tiff_resolutionunit_name:inch i_xres:200 i_yres:200 i_format:tiff tiff_compression:fax4 tiff_bitspersample:1 tiff_photometric:0 tiff_resolutionunit:2 tiff_resolutionunit_name:inch i_xres:200 i_yres:200 i_format:tiff tiff_compression:fax4