resample does not work

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
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

Resample is used to resize and adjust the resolution settings for images that have already been raserized.

It is not used for vector images that was rasterized to a specific density.
That -density setting itself sets the appropriate size and resolution of the resulting image. your -resample will do NOTHING!

For more info on vector and raster images see.
http://www.cit.gu.edu.au/~anthony/graph ... ts/#vector
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

You may then have found a bug where the -density used on a EPS is not saved with the rasterized image.

Check the resulting image with verbose.

It amy also be that PNG has some extra meta tag the IM is not setting to save the image resolution or density.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
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 mail cristy with that suggestion.

This -units probelm has come up before, and I am not sure why it isn't a default. Must be a reason though.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

If you read the PNG specification you will find pixels-per-inch is not supported in the PNG format.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

But it is needed for postscript conversion. The PNG was just the output result.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply