Page 1 of 1

maintaining image quality jpeg

Posted: 2009-11-06T00:53:49-07:00
by peterbradd
hi,

convert a.pdf a.jpeg

reduces DPI of PDF from 300 to DPI of JPEG to 72.

I need print quality JPEG - 300DPI

I used:
peter-bradds-powerbook-g4-15:~ peter$ cd /users/peter/desktop/temp
peter-bradds-powerbook-g4-15:/users/peter/desktop/temp peter$ convert -quality100 a.pdf a.jpeg
convert: unrecognized option `-quality100' @ convert.c/ConvertImageCommand/2087.

1. What am i doing wrong?

2. Is there other output settings can i utilize to maintain quality when making a jpeg?

Thanks

Re: maintaining image quality jpeg

Posted: 2009-11-06T10:34:55-07:00
by fmw42
try adding -density

convert a.pdf -quality 100 -density 300 a.jpg

Re: maintaining image quality jpeg

Posted: 2009-11-06T16:04:52-07:00
by peterbradd
I need to maintain the canvas size of 150mm by 105mm and IM is reducing the canvas size to 36mm by 25mm. the same ratio, just smaller.
how can i maintain the canvas size?

Re: maintaining image quality jpeg

Posted: 2009-11-06T18:05:03-07:00
by fmw42

Re: maintaining image quality jpeg

Posted: 2009-11-06T21:20:45-07:00
by peterbradd
I am new to IM.

a.pdf is a 135 page pdf which needs to be turned into 135 jpeg files with a image size of 4 x 6 inches, whilst remaining 300pdi.

does -resample require height x width ? if so what is the correct height x width to enter to achieve the above?

I am typing currently;

convert a.pdf -quality 100 -density 300 a.jpeg

Thanks in advance.

Re: maintaining image quality jpeg

Posted: 2009-11-06T23:10:46-07:00
by fmw42
post a single page of your pdf.

or

try

convert -density 300 a.pdf[0] -quality 100 a.jpg

if that does not work, then you need to figure out given the resulting image size in pixels and density of the output, how many pixels you want to keep the dimensions in inches that you want. Then do a -resize with that number of pixels in Width and Height.

convert -density 300 a.pdf[0] -resize WidthxHeight -quality 100 a.jpg


(Note 4x6 inches by 300dpi results in 1200x1600 pixels)

So you could try

convert -density 300 a.pdf[0] -resize 1200x1600\! -quality 100 a.jpg


Alternately, -resample is supposed to keep the same dimension in images by changing the number of pixels so that you get the density you want. But I don't know about pdf input as it has no particular size or density. That is why you set the density before reading the pdf in the above.

So you could try

convert a.pdf -resample 300x300 -quality 100 a.jpg


If you provide a one-page pdf, then I can try to figure it out for you.

Re: maintaining image quality jpeg

Posted: 2009-11-08T17:07:54-07:00
by peterbradd
Hi,

Thanks

convert -density 300 a.pdf[0] -quality 100 a.jpg

was successful!

my notes are as follows:

convert -density 300 a.pdf[0] -quality 100 a.jpg
- worked perfectly. I achieved a 300DPI Jpeg at the same canvas size. 4x6 inches

convert -density 300 a.pdf[0] -resize WidthxHeight -quality 100 a.jpg
- image size not 4X6 inches 5.3x4

convert a.pdf -resample 300x300 -quality 100 a.jpg
- image was 300DPI but came out distorted and fuzzy.

Re: maintaining image quality jpeg

Posted: 2009-11-08T17:24:51-07:00
by fmw42
convert -density 300 a.pdf[0] -resize WidthxHeight -quality 100 a.jpg
- image size not 4X6 inches 5.3x4
you left off the \!

and I had a typo 1200x1600 should have been 1200x1800

convert -density 300 a.pdf[0] -resize 1200x1800\! -quality 100 a.jpg

4x6 inches at 300 dpi = 1200x1800 pixels