[GastForen Betriebsysteme und Dienste HELIOS Vektor EPS zu Tranz.PNG

  • Suche
  • Hilfe
  • Lesezeichen
  • Benutzerliste
Themen
Beiträge
Moderatoren
Letzter Beitrag

Vektor EPS zu Tranz.PNG

Pippalu
Beiträge gesamt: 279

11. Jan 2016, 11:07
Beitrag # 1 von 6
Bewertung:
(4363 mal gelesen)
URL zum Beitrag
Beitrag als Lesezeichen
Hallo zusammen,
ich verzweifel ein wenig.
Wie muss das Script für den ImageServer aussehen, was ein Vektor EPS zu einem Tranzparenten PNG speichert?
X

Vektor EPS zu Tranz.PNG

Pippalu
Beiträge gesamt: 279

11. Jan 2016, 13:02
Beitrag # 2 von 6
Beitrag ID: #545851
Bewertung:
(4318 mal gelesen)
URL zum Beitrag
Beitrag als Lesezeichen
Antwort auf [ Pippalu ] Hallo zusammen,
ich verzweifel ein wenig.
Wie muss das Script für den ImageServer aussehen, was ein Vektor EPS zu einem Tranzparenten PNG speichert?


Habe hier einen Auszug auf dem eps2jpg.pl von Helios, was eigentlich schon genau das macht nur das es kein PNG und Transparent ist.

# run 'psrip' to create a temporary CMYK TIFF image ...
print STDERR "Status: Running 'psrip' for file $file\n";
my @cmd = ("$HELIOSDIR/bin/psrip");
push @cmd, "-A";
push @cmd, "-l 3";
push @cmd, "-s $xshift,$yshift";
push @cmd, "-e $x,$y";
push @cmd, "-oPrintResolution=$res";
push @cmd, "-oRasterImageType=TIFF";
push @cmd, ("-i", "$filename", "$newbase");
print "Cmd: ".(join " ",@cmd)."\n" if ($scriptdebug > 0);
system(@cmd);

# ... and convert it to a RGB JPEG
print STDERR "Status: Running 'layout' for file $newbase.1.tif\n";
@cmd = ("$HELIOSDIR/bin/layout");
push @cmd, "-v" if ($scriptdebug > 0);
push @cmd, "-oOmitProfile=True";
push @cmd, "-oSpotToProcess=True";
push @cmd, "-oPrintColor=RGB";
push @cmd, ("-l", "$newbase.1.tif", "{unix,native,,JPEG}$newbase.jpg");
print "Cmd: ".(join " ",@cmd)."\n" if ($scriptdebug > 0);
system(@cmd);

# delete the temporary TIFF file
system("$HELIOSDIR/bin/dt", "rm", "$newbase.1.tif");

print "End Script: $0 $file\n" if ($scriptdebug > 0);


als Antwort auf: [#545848]

Vektor EPS zu Tranz.PNG

Thomas Richard
Beiträge gesamt: 19334

11. Jan 2016, 14:06
Beitrag # 3 von 6
Beitrag ID: #545852
Bewertung:
(4292 mal gelesen)
URL zum Beitrag
Beitrag als Lesezeichen
Antwort auf [ Pippalu ]
Code
push @cmd, ("-l", "$newbase.1.tif", "{unix,native,,JPEG}$newbase.jpg"); 


Und wenn du das jetzt gegen

Code
push @cmd, ("-l", "$newbase.1.tif", "{unix,native,,PNG}$newbase.png"); 


ersetzt, passiert was? Kein PNG oder nur keine Transparenz?


als Antwort auf: [#545851]

Vektor EPS zu Tranz.PNG

Pippalu
Beiträge gesamt: 279

11. Jan 2016, 14:39
Beitrag # 4 von 6
Beitrag ID: #545854
Bewertung:
(4282 mal gelesen)
URL zum Beitrag
Beitrag als Lesezeichen
Hi habe ich gemacht, jetzt assiert mit der Datei gar nichts mehr


als Antwort auf: [#545852]

Vektor EPS zu Tranz.PNG

Pippalu
Beiträge gesamt: 279

15. Jan 2016, 12:50
Beitrag # 5 von 6
Beitrag ID: #545986
Bewertung:
(4037 mal gelesen)
URL zum Beitrag
Beitrag als Lesezeichen
Hallo zusammen ich habe es hinbekommen das ich ein TranzPNg bekomme. Nur wie stelle ich es an, das ich das Bild auch in der maximalen Ausdehnung auf 2000 Pixel bekomme?


/>
<File_Types
Types="EPSF"
Suffixes="eps"
Folder_Changes="false"
/>
<Environment
OUTDIR="DONE"
MAXWIDTH="2000"
MAXHEIGHT="2000"
/>
</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;
STDERR->autoflush(1); # Write data immediately to fd

my $scriptdebug = int ($ENV{SCRIPTDEBUG} || "0");
my $maxwidth = int ($ENV{MAXWIDTH} || "2000");
my $maxheight = int ($ENV{MAXHEIGHT} || "2000");
my $outdir = $ENV{OUTDIR} || die "$0: directory not defined\n";
my $file = $ARGV[0] || die "$0: no input file specified\n";

print "Start Script: $0 $file\n" if ($scriptdebug > 0);

my $dir = (dirname $file)."/";
my $filename = basename $file;
(my $newbase = $filename) =~ s/\.\w*$//;

# create output directory and move the file into it
system("$HELIOSDIR/bin/dt", "mkdir", "$dir$outdir") if not stat("$dir$outdir");
system("$HELIOSDIR/bin/dt", "mv", "$file", "$dir$outdir");

# go to output directory
my $workdir = HELIOSPathToSystemPath("$dir$outdir");
chdir($workdir);

my $x = 0;
my $y = 0;
my $xshift = 0;
my $yshift = 0;
my $res = 72;
my $GotBox = 0;

# get the BoundingBox from the EPSF
open(FD, "<$filename");
while(<FD>) {
my $line = $_;

# try to get the HiResBoundingBox...
if($line =~ /%%HiResBoundingBox: (\d+.\d+) (\d+.\d+) (\d+.\d+) (\d+.\d+)/) {
print "HiResBoundingBox: llx: $1\tlly: $2\turx: $3\tury: $4\n" if ($scriptdebug > 0);
$xshift = $1/72; # the shift value unit is inch not pixel
$yshift = $2/72;
$x = $3-$1;
$y = $4-$2;
last;
}
# ... but use the BoundingBox when it it not available.
next if $GotBox;
if ($line =~ /%%BoundingBox: (\d+) (\d+) (\d+) (\d+)/) {
print "BoundingBox: llx: $1\tlly: $2\turx: $3\tury: $4\n" if ($scriptdebug > 0);
$xshift = $1/72; # the shift value unit is inch not pixel
$yshift = $2/72;
$x = $3-$1;
$y = $4-$2;
$GotBox = 1;
}
}
close(FD);

if($x eq 0 || $y eq 0) { die "Sorry, no suitable bounding box found\n"; }
print "Image size: x: $x\ty: $y\txshift: $xshift\tyshift: $yshift\n" if ($scriptdebug > 0);

# calculate a new resolution to get an image with specified dimensions
# check x and y pixels and calculate new x and y
if($x > $maxwidth) { # if x is more than specified max value
my $scale = $maxwidth/$x; # factor ($scaling times higher than $maxwidth)
$res *= $scale; # the new resolution
$x *= $scale; # recalculate $x and $y
$y *= $scale;
print "x is greater than $maxwidth px - new x: $x; new y: $y; new resolution: $res (scaling=$scale)\n" if ($scriptdebug > 0);
}
if($y > $maxheight) { # same as above, but using y now
my $scale = $maxheight/$y;
$res *= $scale;
$x *= $scale;
$y *= $scale;
print "y is greater than $maxheight px - new x: $x; new y: $y; new resolution: $res (scaling=$scale)\n" if ($scriptdebug > 0);
}

$xshift = -$xshift;

# run 'psrip' to create a temporary CMYK TIFF image ...
print STDERR "Status: Running 'psrip' for file $file\n";
my @cmd = ("$HELIOSDIR/bin/psrip");
push @cmd, "-A";
push @cmd, "-T";
push @cmd, "-l 3";
push @cmd, "-s $xshift,$yshift";
push @cmd, "-e $x,$y";
push @cmd, "-oPrintResolution=$res";
push @cmd, "-oRasterImageType=TIFF";
push @cmd, "-oTransparencyMask=on";
push @cmd, ("-i", "$filename", "$newbase");
print "Cmd: ".(join " ",@cmd)."\n" if ($scriptdebug > 0);
system(@cmd);

# ... and convert it to a RGB JPEG
print STDERR "Status: Running 'layout' for file $newbase.1.tif\n";
@cmd = ("$HELIOSDIR/bin/layout");
push @cmd, "-v" if ($scriptdebug > 0);
push @cmd, "-oOmitProfile=True";
push @cmd, "-oSpotToProcess=True";
push @cmd, "-oPrintColor=RGB";
push @cmd, ("-l", "$newbase.1.tif", "{unix,native,,PNGf}$newbase.png");
print "Cmd: ".(join " ",@cmd)."\n" if ($scriptdebug > 0);
system(@cmd);

# delete the temporary TIFF file
system("$HELIOSDIR/bin/dt", "rm", "$newbase.1.tif");

print "End Script: $0 $file\n" if ($scriptdebug > 0);


als Antwort auf: [#545854]

Vektor EPS zu Tranz.PNG

GreatOm
Beiträge gesamt: 378

25. Apr 2016, 13:57
Beitrag # 6 von 6
Beitrag ID: #549164
Bewertung:
(3449 mal gelesen)
URL zum Beitrag
Beitrag als Lesezeichen
Antwort auf [ Pippalu ] Hallo zusammen ich habe es hinbekommen das ich ein TranzPNg bekomme. Nur wie stelle ich es an, das ich das Bild auch in der maximalen Ausdehnung auf 2000 Pixel bekomme?


In dem für das Hoffolder Skript in HELIOS Admin "MAXWIDTH" und "MAXHEIGHT" entsprechend gesetzt werden.

PS. Normalerweise findet kein "upscaling" statt. Wenn also das EPS eine kleine Boundingbox hat wird auch nur dessen Größe verwendet. Falls mehr benötigt wird ist es vielleicht sinnvoller an der Auflösung zu drehen.

Gruß,

GreatOm


als Antwort auf: [#545986]
X