in reply to Re: how to call perl from asp
in thread how to call perl from asp
Rajen Shah rajenrshah@rediffmail.com#!/usr/bin/perl use Image::IPTCInfo; chdir('demo_images'); my @files = ('burger_van.jpg', 'dog.jpg'); foreach my $filename (@files) { # Create new IPTCInfo object for the file my $info = new Image::IPTCInfo($filename); # With this you can get a list of keywords... my $keywordsRef = $info->Keywords(); # ...and specific attributes print "file : $filename\n"; print "caption : " . $info->Attribute('caption/abstract') . "\n" +; foreach $keyword (@$keywordsRef) { print " keyword : $keyword\n"; } # Create some mappings and extra data for messing # with XML and SQL exports. my %mappings = ( 'caption/abstract' => 'caption', 'by-line' => 'byline', 'city' => 'city', 'province/state' => 'state'); my %extra = ('extra1' => 'value1', 'filename' => $filename); # Demo XML export, with and without extra stuff print $info->ExportXML('photo'); } exit;
|
|---|