Page 1 of 1

Convert PDF to png(or tiff) with Magick++

Posted: 2015-12-10T09:01:24-07:00
by hosigaki
Hello, I am newbie ImageMagic and Magic++.
I want to create Linux application which converting PDF to PNG(or TIFF) using Magic++ .
This application is very simple.
Reading PDF file and writing PNG (300DPI GrayScale 2480width and 3507height).
or
Reading PDF file and writing TIFF (300DPI GrayScale 2480width and 3507height).

I can do this using convert command(ImageMagick).
$ convert -density 300 -geometry 2480x3507 -type GrayScale src.pdf dest.png
$ convert -density 300 -geometry 2480x3507 -type GrayScale src.pdf dest.tiff

But, I do not know with Magic++.

Image image;
image.read( "src.pdf" );
image.write( "dest.png" ); <-- I down know how define -density 300, -geometry 2480x3507 -type GrayScale
image.write( "dest.tiff" ); <-- I down know how define -density 300, -geometry 2480x3507 -type GrayScale

Please anyone advise me.

Than you.