Page 1 of 1

Convert EPS to TIF

Posted: 2016-04-11T06:50:45-07:00
by KingCanadian
Hi there,

trying to convert EPS to TIF. Want so get the same result as doing so in Photoshop (Open EPS - Save as TIF with LZW Compression)

Commandline: convert -compress LZW image.eps image.tif

With ImageMagick 6.5.4-Q8 the EPS is converted to a TIF in base geometry size. So does Photoshop too.

With ImageMagick 6.9.3-Q16 the EPS is convertes to a TIF in page geometry size.

How does this come? How can i get 6.9.3 to use base geometry for sizing?

Greetings,

KC

Identify -verbose from the EPS:

Code: Select all

Image: P:\ELO\Zeitschriften\prog\01_01_0001.eps
  Format: PS (PostScript)
  Mime type: application/postscript
  Class: DirectClass
  Geometry: 851x688+0+0
  Base geometry: 3544x2866
  Resolution: 300x300
  Print size: 2.83667x2.29333
  Units: PixelsPerInch
  Type: ColorSeparation
  Base type: ColorSeparation
  Endianess: Undefined
  Colorspace: CMYK
  Depth: 16/8-bit
  Channel depth:
    cyan: 8-bit
    magenta: 8-bit
    yellow: 8-bit
    black: 8-bit
  Channel statistics:
    Pixels: 585488
    Cyan:
      min: 0 (0)
      max: 65535 (1)
      mean: 31682.4 (0.483443)
      standard deviation: 19092.2 (0.291329)
      kurtosis: -0.946258
      skewness: -0.355256
      entropy: 0.908727
    Magenta:
      min: 0 (0)
      max: 65535 (1)
      mean: 32941 (0.502648)
      standard deviation: 18453.2 (0.281578)
      kurtosis: -1.07035
      skewness: 0.510134
      entropy: 0.921316
    Yellow:
      min: 0 (0)
      max: 65535 (1)
      mean: 21972.8 (0.335284)
      standard deviation: 22284.7 (0.340043)
      kurtosis: -1.43844
      skewness: 0.401641
      entropy: 0.787666
    Black:
      min: 0 (0)
      max: 65535 (1)
      mean: 9012.55 (0.137523)
      standard deviation: 16334.4 (0.249247)
      kurtosis: 2.98807
      skewness: 1.99241
      entropy: 0.540402
  Image statistics:
    Overall:
      min: 0 (0)
      max: 65535 (1)
      mean: 23902.2 (0.364724)
      standard deviation: 19160.2 (0.292366)
      kurtosis: -0.179813
      skewness: 0.522875
      entropy: 0.789528
  Total ink density: 400%
  Rendering intent: Perceptual
  Gamma: 0.454545
  Chromaticity:
    red primary: (0.64,0.33)
    green primary: (0.3,0.6)
    blue primary: (0.15,0.06)
    white point: (0.3127,0.329)
  Background color: cmyk(255,255,255,0)
  Border color: cmyk(223,223,223,0)
  Matte color: cmyk(189,189,189,0)
  Transparent color: cmyk(0,0,0,0)
  Interlace: None
  Intensity: Undefined
  Compose: Over
  Page geometry: 851x688+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Undefined
  Orientation: Undefined
  Properties:
    date:create: 2016-04-11T15:49:29+02:00
    date:modify: 2016-04-11T15:49:29+02:00
    ps:HiResBoundingBox: 850.56x687.84+0+0
    ps:Level: Adobe-3.0 EPSF-3.0

    signature: 020649830b0cb8e2434e4be973e975b03273acb546dee5251a969399282d163e
  Profiles:
    Profile-8bim: 6560 bytes
    Profile-iptc: 417 bytes
      unknown[2,0]: 
      Caption[2,120]: Teenager, Zielscheibe, Pfeile


auáen, M„dchen, Bogenschltze, Jugendliche, lachen, Bogen, Pfeile, Sportbogen, Bogenschieáen, Freizeit, Hobby, Sport, Freizeitbesch„ftigung, Ziel, Treffer, Treffpunkt, Training, Freude, Spaá
      Byline[2,80]: Pigneter
      Credit[2,110]: Mauritius
      Created Date[2,55]: 20001025
      Priority[2,10]: 0
      unknown[2,16]: Menschen, Berufe:Fitness, Frauen einzeln:Bogenschieáen
      unknown[2,21]: 1423
      unknown[2,23]: 00000
      unknown[2,56]: 19941128
      unknown[2,111]: 
      unknown[2,112]: 0002548
      unknown[2,113]: 
      Local Caption[2,121]: 01531619
      unknown[2,123]: 0000
  Artifacts:
    filename: P:\ELO\Zeitschriften\prog\01_01_0001.eps
    verbose: true
  Tainted: False
  Filesize: 2.342MB
  Number pixels: 585K
  Pixels per second: 117.1MB
  User time: 0.016u
  Elapsed time: 0:01.005
  Version: ImageMagick 6.9.3-8 Q16 x64 2016-04-10 http://www.imagemagick.org

Re: Convert EPS to TIF

Posted: 2016-04-11T07:38:43-07:00
by snibgo
Try:

convert -compress LZW -density 1250 image.eps image.tif

Re: Convert EPS to TIF

Posted: 2016-04-11T23:39:59-07:00
by KingCanadian
Thank you for your reply.

-density 1250
gives me a file with size of 610MB - this is much too big.
And why 1250??

The tif converted with Photoshop is 22MB
the tif from the old imagemagick version is 32MB
the EPS is 7MB

Re: Convert EPS to TIF

Posted: 2016-04-12T03:53:23-07:00
by snibgo
300*3544/851 = 300*2866/688 = 1250

Does this give you the same number of pixels as Photoshop? If not, then what density does?

Re: Convert EPS to TIF

Posted: 2016-04-12T05:57:26-07:00
by KingCanadian
Photoshop-TIF with a size of 22MB:
3544 x 2866 Pixel
300dpi
32Bit
LZW

If i use
-compress LZW -density 300 -depth 8
i get the same pixels and depth like with photoshop
but the file is 34MB

Re: Convert EPS to TIF

Posted: 2016-04-12T09:52:18-07:00
by fmw42
Can you post your input EPS and PS TIF to some place such as dropbox.com and put the URL's here?

Re: Convert EPS to TIF

Posted: 2016-04-13T01:09:21-07:00
by KingCanadian
Here is the EPS:
https://onedrive.live.com/redir?resid=B ... file%2ceps

And here the TIF from Photoshop:
https://onedrive.live.com/redir?resid=B ... hoto%2ctif

And here the TIF made with ImageMagick-6.9.3-Q16\convert.exe -compress LZW -density 300 -depth 8
https://onedrive.live.com/redir?resid=B ... hoto%2ctif

Re: Convert EPS to TIF

Posted: 2016-04-13T10:03:32-07:00
by fmw42
I do not see a difference in output size. My IM 6.9.3.8 Q16 makes the same 3544 x 2866 dimension on output using -density 300 when converting the eps to tif.

EDIT: It is strange that when I do

Code: Select all

convert -density 300 -colorspace sRGB 01_01_0001.eps 01_01_0001.ps
the resulting ps file shows only a smaller top left area than in the original eps. So it would appear that something is telling ghostscript to use the smaller area.

Re: Convert EPS to TIF

Posted: 2016-04-13T11:31:33-07:00
by fmw42
I really do not see much difference between your PS created tif and the IM created tif as follows in IM 6.9.3.8 Q16 Mac OSX:

Code: Select all

convert -density 300 01_01_0001.eps tmp2.tif
compare -metric rmse 01_01_0001.tif tmp2.tif null:
26.3575 (0.00040219)

This a .04% difference or 26 out of 65535.

Re: Convert EPS to TIF

Posted: 2016-04-13T23:17:07-07:00
by KingCanadian
When i use the density parameter the pixel size is good in IM. This Problem is solved.

But still left is the file-size of the TIF made by IM is much bigger than the PS TIF.

PS TIF: 22MB
IM TIF: 34MB

Re: Convert EPS to TIF

Posted: 2016-04-14T09:47:22-07:00
by fmw42
Your PS tiff is LZW compressed. In IM add -compression LZW to your command before the output. I don't believe IM compresses by default, but gives an uncompressed output for TIFF.

Re: Convert EPS to TIF

Posted: 2016-04-14T23:33:20-07:00
by KingCanadian
Please see my posting above:
And here the TIF made with ImageMagick-6.9.3-Q16\convert.exe -compress LZW -density 300 -depth 8
https://onedrive.live.com/redir?resid=B ... hoto%2ctif
The IM TIF is already compressed but still 1/3 bigger than the PS TIF...

Identity -verbose of the IM TIF:
Image: P:\EDV\MagicTiffCompressDens3.tif
Format: TIFF (Tagged Image File Format)
Class: DirectClass
Geometry: 3544x2866+0+0
Resolution: 300x300
Print size: 11.8133x9.55333
Units: PixelsPerInch
Type: ColorSeparation
Base type: ColorSeparation
Endianess: MSB
Colorspace: CMYK
Depth: 8-bit
Channel depth:
cyan: 8-bit
magenta: 8-bit
yellow: 8-bit
black: 8-bit
Channel statistics:
cyan:
min: 0 (0)
max: 255 (1)
mean: 123.335 (0.483667)
standard deviation: 74.2814 (0.2913)
kurtosis: -0.944191
skewness: -0.354135
magenta:
min: 0 (0)
max: 255 (1)
mean: 128.297 (0.503124)
standard deviation: 71.7852 (0.281511)
kurtosis: -1.07451
skewness: 0.509974
yellow:
min: 0 (0)
max: 255 (1)
mean: 85.6372 (0.335832)
standard deviation: 86.753 (0.340208)
kurtosis: -1.43748
skewness: 0.400375
black:
min: 0 (0)
max: 255 (1)
mean: 35.1239 (0.137741)
standard deviation: 63.5975 (0.249402)
kurtosis: 2.98061
skewness: 1.9907
Image statistics:
Overall:
min: 0 (0)
max: 255 (1)
mean: 74.4786 (0.292073)
standard deviation: 83.361 (0.326906)
kurtosis: -0.919123
skewness: 0.70153
Total ink density: 400%
Rendering intent: Undefined
Chromaticity:
red primary: (0.64,0.33)
green primary: (0.3,0.6)
blue primary: (0.15,0.06)
white point: (0.3127,0.329)
Interlace: None
Background color: white
Border color: cmyk(223,223,223,0)
Matte color: grey74
Transparent color: black
Page geometry: 3544x2866+0+0
Dispose: Undefined
Iterations: 0
Compression: LZW
Orientation: TopLeft
Properties:
date:create: 2016-04-15T08:30:12+02:00
date:modify: 2016-04-15T08:30:02+02:00
signature: ac35a6cac27cce26ab9a09a470a35342101ec607f3d5a363852d4a3b430d0cd6
tiff:photometric: separated
tiff:rows-per-strip: 1
Profiles:
Profile-8bim: 6560 bytes
Profile-iptc: 420 bytes
unknown[2,0]:
Caption[2,120]: Teenager, Zielscheibe, Pfeile


auáen, M„dchen, Bogenschltze, Jugendliche, lachen, Bogen, Pfeile, Sportbogen, Bogenschieáen, Freizeit, Hobby, Sport, Freizeitbesch„ftigung, Ziel, Treffer, Treffpunkt, Training, Freude, Spaá
Byline[2,80]: Pigneter
Credit[2,110]: Mauritius
Created Date[2,55]: 20001025
Priority[2,10]: 0
unknown[2,16]: Menschen, Berufe:Fitness, Frauen einzeln:Bogenschieáen
unknown[2,21]: 1423
unknown[2,23]: 00000
unknown[2,56]: 19941128
unknown[2,111]:
unknown[2,112]: 0002548
unknown[2,113]:
Local Caption[2,121]: 01531619
unknown[2,123]: 0000
Artifacts:
verbose: true
Tainted: False
Filesize: 33.14mb
Number pixels: 9.687mb
Pixels per second: 15.5mb
User time: 0.609u
Elapsed time: 0:01
Version: ImageMagick 6.5.4-8 2009-08-03 Q8 OpenMP http://www.imagemagick.org

Re: Convert EPS to TIF

Posted: 2016-04-15T03:04:00-07:00
by snibgo
Different software uses different compression algorithms, giving different sizes. IM's "-compression ZIP" gives a filesize that is closer to the filesize from Photoshop.

Re: Convert EPS to TIF

Posted: 2016-04-17T23:35:11-07:00
by KingCanadian
OK... i thought LZW is a standard algorithm and works equal in every software - but that was a fault.
So the only thing i can do is to use photoshop.

Thank you!