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

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
hosigaki
Posts: 1
Joined: 2015-12-10T08:36:56-07:00
Authentication code: 1151

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

Post by hosigaki » 2015-12-10T09:01:24-07:00

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.

Post Reply