How do I fill the page when converting jpeg -> postscript

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
falk

How do I fill the page when converting jpeg -> postscript

Post by falk »

Hi all; this has been driving me nuts, mostly due to the inconsistency of my results.

How do I specify where on the page an image will appear when I convert jpeg -> postscript. Or more simply, how can I get the image to fill the page? What if I want margins?

Here's what I've tried:

Starting with a high-res image, "convert foo.jpg foo.ps" generates a postscript file with a very large bounding box.

"convert foo.jpg -page Letter foo.ps" generates a postscript file that fills the page as best it can. There are no margins, but I can deal with that.

Starting with a smaller image (625x816), "convert foo.jpg foo.ps" generates an image that fills about 1/4 of the page. Why so small? Is the default image density more than 72 ppi?

"convert foo.jpg -page Letter foo.ps" produces almost (but not quite) identical results

"convert foo.jpg -page Letter -density 72 foo.ps" creates an image that fills the page. This makes sense.

"convert foo.jpg -page Letter -density 36 foo.ps" creates a large image much larger than the page. Why so large? Does -density override -page?

"convert foo.jpg -page Letter -geometry 612x792 foo.ps" was no help at all. It rescaled the image from 625x816 to 612x792 before converting, but then still only filled 1/4 of the page.

"convert foo.jpg -geometry 612x792 -page 612x792 foo.ps" had the same results.

I can't quite figure out the pattern here. Just exactly how am I supposed to generate a postscript file and control how the image is placed on the page?
Post Reply