Hallo zusammen
danke für eure Antwort. Sorry hätte das ganze besser beschreiben sollen
hier mal ein Beispiel:
Bild geliefert: 121 x 81 cm, 72 dpi
mein Test liefert: 121 x 81 cm, 300 dpi
soll aber sein: 29 x 19 cm, 300 dpi
die grösse der gelieferten Bilder, auch die geliefert Auflösung, sind aber leider immer verschieden!
Habe selbst leider gar keine Scriptkentnisse und muss das mit den Scriptassistant machen….
Danke euch für eine weiteren tipp, leider kann ich da das von GreatOm erwähnte Image tagging nicht finden….
Danke euch für einen Tipp
Steve
Hier das erstellt script:
</SETTINGS>
use strict;
BEGIN {
use vars qw($HELIOSDIR);
$HELIOSDIR = $ENV{"HELIOSDIR"} or die "HELIOSDIR not set in environment\n";
unshift(@INC, "$HELIOSDIR/etc/perl");
}
use HELIOS::Utils;
use File::Basename;
use IO::Handle;
STDOUT->autoflush(1);
STDERR->autoflush(1);
# input file
my $sInputFile = $ARGV[0] || die "$0: no input file specified\n";
# used applications
my $layoutCmd = "$HELIOSDIR/bin/layout";
my $dtCmd = "$HELIOSDIR/bin/dt";
# environment parameters
my $sOutDir = $ENV{OUTDIR} || "DONE";
my $sErrDir = $ENV{ERRDIR} || "ERROR";
my $iScriptDebug = int ($ENV{SCRIPTDEBUG} || "0");
# get directory name, base name with and without suffix from input file name
my $iPos = rindex($sInputFile, "/") + 1;
my $sWorkDir = HELIOSPathToSystemPath(substr($sInputFile, 0, $iPos));
my $sBasename = substr($sInputFile, $iPos);
(my $sShortBasename = $sBasename) =~ s/\.\w*$//;
my $Suffix = substr($sBasename, rindex($sBasename, "."));
my $DeleteOriginal = 0;
my $sTargetSuffix = "$Suffix";
print " Start Script: [$$] $0 $sInputFile\n" if ($iScriptDebug > 0);
chdir("$sWorkDir") || die "[$$] $0: cannot change working directory to $sWorkDir\n";
if (! -d $sOutDir) {
!system("$dtCmd", "mkdir", "$sOutDir") || die "[$$] $0: cannot create directory $sWorkDir$sOutDir\n";}
if (! -d $sErrDir) {
!system("$dtCmd", "mkdir", "$sErrDir") || die "[$$] $0: cannot create directory $sWorkDir$sErrDir\n";}
# determine names of moved input file and output files
my $sProcessedFile = "$sShortBasename" . ($sTargetSuffix eq $Suffix ?".conv$Suffix" : $sTargetSuffix);
my $iCounter = 0;
while (-f "$sOutDir/$sProcessedFile" || -f "$sErrDir/$sProcessedFile") {
$iCounter++;
$sProcessedFile = "$sShortBasename.$iCounter".($sTargetSuffix eq $Suffix ?".conv$Suffix" : $sTargetSuffix);
}
print STDERR "Status: Running image conversion for file $sInputFile\n";
my @cmd = ($layoutCmd);
push @cmd, "-oPrintColor=RGB";
push @cmd, "-oCompressPrint=compress";
push @cmd, "-oScreenResolution=0";
push @cmd, "-oBitsPerComponent=8";
push @cmd, "-oSpotToProcess=FALSE";
push @cmd, "-oIgnoreMasks=FALSE";
push @cmd, "-oIgnoreSpots=FALSE";
push @cmd, "-oOutputProfile=AdobeRGB1998.icc";
push @cmd, "-oOmitProfile=FALSE";
push @cmd, "-oPrintResolution=300";
push @cmd, "-oIncludeProfile=TRUE";
push @cmd, "-oThumbnail=TRUE";
push @cmd, "-oProfilePaths=RGB=AdobeRGB1998.icc";
push @cmd, ("-l","$sBasename");
push @cmd, "$sProcessedFile";
print "[$$] Command line: " . (join " ", @cmd) . "\n" if ($iScriptDebug > 0);
my $iReturnValue = system(@cmd);
my $targetDir = $sErrDir;
if (!$iReturnValue) {
$targetDir = $sOutDir;
print "[$$] Move \"$sProcessedFile\" to \"$targetDir/$sProcessedFile\"\n";
system("$dtCmd", "mv", "$sProcessedFile", "$targetDir/$sProcessedFile") == 0 || die "[$$] $0: cannot move converted file to directory $sWorkDir$targetDir";
}
$sProcessedFile = "$sShortBasename.Original". ($iCounter?".$iCounter":"") . "$Suffix";
if ($DeleteOriginal) {
print "[$$] Remove original file \"$sBasename\" \n";
system("$dtCmd", "rm", "$sBasename") == 0 || die "[$$] $0: cannot remove input file.";
} else {
print "[$$] Move \"$sBasename\" to \"$targetDir/$sProcessedFile\"\n";
system("$dtCmd", "mv", "$sBasename", "$targetDir/$sProcessedFile") == 0 || die "[$$] $0: cannot move input file to directory $sWorkDir$targetDir";
}
print "End Script: [$$] $0 $sInputFile\n" if ($iScriptDebug > 0);
exit 0;
als Antwort auf: [#537625]