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?".
Jack
Post
by Jack » 2009-05-04T15:58:04-07:00
Hi guys
I'm just getting started with imagemagick so please bear with me : ]
I've been trying to convert a vector pdf into a png. The width of the png should be exactly 900 pixels.
this is the command I tried, however the png is always around 200 pixels (the size the pdf was encoded at):
Code: Select all
convert -size 900 test.pdf test.png
I also tried -resize, but that resized the png file instead of the pdf, introducing scaling artifacts.
what am I doing wrong?
magick
Site Admin
Posts: 11064 Joined: 2003-05-31T11:32:55-07:00
Post
by magick » 2009-05-04T16:26:09-07:00
Try the -density option, for example,
convert -density 100 image.pdf image.png
Jack
Post
by Jack » 2009-05-04T17:25:18-07:00
so there's no way to specify an absolute pixel amount for the output?
I guess I'll have to create a really big png using the density option, and then downsample it to the absolute size I need. Is that correct?
thanks
magick
Site Admin
Posts: 11064 Joined: 2003-05-31T11:32:55-07:00
Post
by magick » 2009-05-04T17:55:07-07:00
That would work. Super-sample the image with the -density option then resize to your absolute dimensions with -resize.
Jack
Post
by Jack » 2009-05-04T18:11:02-07:00
ok, thanks for your help!
Users browsing this forum: Bing [Bot] , Google [Bot] , Semrush [Bot] and 4 guests