I'm reading in .ai and .pdf files and they look pretty bad. How can I set the -density using MagickWand?
Also,
I read in my searches about this that the default dpi is 72. Can this be changed?
Thanks in advance,
Eric James
How do you do "-density"?
-
- Posts: 1015
- Joined: 2005-03-21T21:16:57-07:00
Re: How do you do "-density"?
The -density option sets the x and y resolution of the image. You can set the units and resolution of the image with these functions which both return a Boolean result. Call them before you read the image.
// units are PixelsPerInchResolution or PixelsPerCentimeterResolution - I don't know the PHP name for these constants (I use C).
MagickSetImageUnits(wand,PixelsPerInchResolution);
// x and y resolution are doubles.
MagickSetImageResolution(wand,300,300);
Pete
// units are PixelsPerInchResolution or PixelsPerCentimeterResolution - I don't know the PHP name for these constants (I use C).
MagickSetImageUnits(wand,PixelsPerInchResolution);
// x and y resolution are doubles.
MagickSetImageResolution(wand,300,300);
Pete
Re: How do you do "-density"?
Those changed did not make a difference. For now I ended up just using exec() in php so I could use -density. A bit frustrating.
Anybody have any other info on setting -density using magickwand?
Thanks again,
Eric James
Anybody have any other info on setting -density using magickwand?
Thanks again,
Eric James
Re: How do you do "-density"?
I guess MagickSetResolution should be used instead of MagickSetImageResolution.
Mikko Koppanen
My blog: http://valokuva.org
My blog: http://valokuva.org