Convert PDF to BMP with different size

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
aikiaviator
Posts: 2
Joined: 2014-03-07T07:11:16-07:00
Authentication code: 6789

Convert PDF to BMP with different size

Post by aikiaviator »

Hi,

I am very new at this and as such I am very much just fumbling around. My requirement is to generate a BMP of the size 640x982 pixels from a PDF of disproportional height and width.

The conversion in proportion is 640x909. But I need it to be set to the 640x982 BUT maintaining the original image size. In other words extended down with blank fill.

I am using the command line editor for this and have come up with the following, however, can't quite get the final stretch.

convert -density 119x119 -resize 640x982^ c:\AFS_Charts\PDF\MMBGN01-136.pdf -colors 256 -compress None -colorspace RGB -format PNG c:\AFS_Charts\BMPS\MMBGN01-136.png
convert c:\AFS_Charts\BMPS\MMBGN01-136.png -colors 256 -compress None -colorspace RGB -format BMP3 c:\AFS_Charts\BMPS\MMBGN01-136.bmp

Any help is greatly appreciated.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Convert PDF to BMP with different size

Post by snibgo »

aikiaviator wrote:In other words extended down with blank fill.
Perhaps you want "-extent 640x982".

See http://www.imagemagick.org/script/comma ... php#extent
snibgo's IM pages: im.snibgo.com
aikiaviator
Posts: 2
Joined: 2014-03-07T07:11:16-07:00
Authentication code: 6789

Re: Convert PDF to BMP with different size

Post by aikiaviator »

Thanks worked a treat with some minor other changes.
Post Reply