Problem with convert, no errors and no destination images.

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?".
Post Reply
Spinx

Problem with convert, no errors and no destination images.

Post by Spinx »

I try to convert a PDF file into images, and this command works with other PDF files.

Doesn't create any images:

Code: Select all

convert -strip -profile USWebCoatedSWOP.icc -density 117.32 mamoetMagazine.pdf -resize 970 -profile sRGB.icm mamoetMagazine\big\img.jpg
Does create images as it should:

Code: Select all

convert -strip -profile USWebCoatedSWOP.icc -density 72 mamoetMagazine.pdf -resize 406x570! -profile sRGB.icm mamoetMagazine\pages\img.jpg
What can be wrong? As I said the first command works with all other PDF-files I have tried.

Download the PDF (12,7mb)
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Your PDF appears corrupt or Ghostscript 7.07 or 8.15 are not sufficient. Both return errors when attempting to render the document.
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Post by el_supremo »

With IM 6.3.1 and GS 8.53 I got both commands to render the pages if -density is moved after the input filename:

Code: Select all

convert -strip -profile USWebCoatedSWOP.icc mamoetMagazine.pdf -density 117.32 -resize 970 -profile sRGB.icm mamoetMagazine\big\img.jpg
Pete
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

We converted your PDF image to JPEG without any problems with Ghostscript 8.54.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

I suggest you.... read the image before stripping and profiling!
Otherwise it is undefined if the strip is done first or the profile is done first.

See IM Examples... Legacy Command Line Style
http://www.cit.gu.edu.au/~anthony/graph ... cs/#legacy
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Spinx

Post by Spinx »

Thanks for the replys. I tried to change my command and ended up with this:

Code: Select all

convert Wiseguide.pdf -strip -profile USWebCoatedSWOP.icc -density 117.32 -resize 970 -profile sRGB.icm img.jpg
The convert works but the images I get now is not as sharp as the images with the last command, what am I doing wrong?

Old image
New image

Regards!
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

-density is a input setting.. It needs to be defined before the image read.

The other options are operators and need to be applied AFTER the image has been read, in the order you want to apply them.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply