Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
triumvir
Posts: 3 Joined: 2011-10-27T02:15:42-07:00
Authentication code: 8675308
Contact:
Post
by triumvir » 2011-10-27T02:38:06-07:00
Hi,
there is a problem if I convert from ps (eps) to pdf.
At the version 6.4.2 it works well. The pdf is well and I am able to mark text in it.
With the version 6.7.3-2 the conversion works too, but the result is a bitmap pdf. The size of the file is for the factor 10 bigger.
Version 6.4.2:
Code: Select all
convert -verbose 00976451.eps.ps test.pdf
"gs" -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=pam" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -g128x142 "-sOutputFile=/tmp/magick-XXI7ZoFn" "-f/tmp/magick-XXD8ZMaF" "-f/tmp/magick-XXLJKlGW"
/tmp/magick-XXI7ZoFn PNM 128x142 128x142+0+0 8-bit ColorSeparation DirectClass 71.1kb
00976451.eps.ps PS 128x142 128x142+0+0 16-bit ColorSeparation DirectClass 71.1kb
"gs" -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=pdfwrite" "-sOutputFile=/tmp/magick-XXBROoY6" "-f/tmp/magick-XXTwlvTi"
Version 6.7.3-2:
Code: Select all
convert -verbose -format pdf 00976451.eps.ps test.pdf
"gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pam" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -g128x142 "-sOutputFile=/tmp/magick-M9IGiCcL-%08d" "-f/tmp/magick-8vmo9Cu4" "-f/tmp/magick-tKSJsJMn"
/tmp/magick-M9IGiCcL-00000001 PAM 128x142 128x142+0+0 8-bit ColorSeparation DirectClass 72.8KB 0.000u 0:00.000
00976451.eps.ps PS 128x142 128x142+0+0 16-bit ColorSeparation DirectClass 72.8KB 0.000u 0:00.000
00976451.eps.ps=>test.pdf PS 128x142 128x142+0+0 16-bit ColorSeparation DirectClass 86.6KB 0.000u 0:00.010
At the version 6.7.3 the second step is missing (gs ...-sDEVICE=pdfwrite ...).
Is there a mistake by me ??
anthony
Posts: 8883 Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia
Contact:
Post
by anthony » 2011-10-27T20:24:59-07:00
It looks like the delegates are attempting to 'short-circuit' as you don't modify the image in memory.
Add a
-taint between the read of the PS and the write of the PDF.
See IM Examples, File Handling, Delegates for more detail.
http://www.imagemagick.org/Usage/files/#delegate_direct
triumvir
Posts: 3 Joined: 2011-10-27T02:15:42-07:00
Authentication code: 8675308
Contact:
Post
by triumvir » 2011-10-27T23:56:01-07:00
anthony wrote: It looks like the delegates are attempting to 'short-circuit' as you don't modify the image in memory.
Add a
-taint between the read of the PS and the write of the PDF.
See IM Examples, File Handling, Delegates for more detail.
http://www.imagemagick.org/Usage/files/#delegate_direct
No change:
Code: Select all
convert -verbose 00976451.eps.ps -taint pdf:test.pdf
"gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pam" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -g128x142 "-sOutputFile=/tmp/magick-h0HZ3vA2-%08d" "-f/tmp/magick-CBWolTSC" "-f/tmp/magick-nv9u2lbd"
/tmp/magick-h0HZ3vA2-00000001 PAM 128x142 128x142+0+0 8-bit ColorSeparation DirectClass 72.8KB 0.000u 0:00.000
00976451.eps.ps PS 128x142 128x142+0+0 16-bit ColorSeparation DirectClass 72.8KB 0.000u 0:00.000
00976451.eps.ps=>test.pdf PS 128x142 128x142+0+0 16-bit ColorSeparation DirectClass 86.6KB 0.000u 0:00.009
magick
Site Admin
Posts: 11064 Joined: 2003-05-31T11:32:55-07:00
Post
by magick » 2011-10-28T06:03:26-07:00
Try this command:
convert -verbose 00976451.eps.ps -define delegate:bimodal=true test.pdf
Bimodal delegate support is seldom used and it was affecting performance so we made it an option.
triumvir
Posts: 3 Joined: 2011-10-27T02:15:42-07:00
Authentication code: 8675308
Contact:
Post
by triumvir » 2011-10-28T06:19:14-07:00
magick wrote: Try this command:
convert -verbose 00976451.eps.ps -define delegate:bimodal=true test.pdf
Bimodal delegate support is seldom used and it was affecting performance so we made it an option.
It works. This is the right moment to go into the weekend
Thanks a lot
P.S Where can I find some documentation about the Option
bimodal
anthony
Posts: 8883 Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia
Contact:
Post
by anthony » 2011-10-29T20:55:00-07:00
Sounds to me that this bimodel is better done simply by forgetting IM enterirely have just using ghostscript directly.
triumir Can you give the actual delegate command that the bimodel delegate generations in your example.
Users browsing this forum: Ahrefs [Bot] , Bing [Bot] , Google [Bot] and 7 guests