Page 1 of 1

Convert From JPG to PDF - Geometry and Resolution are changed

Posted: 2017-02-14T19:43:23-07:00
by leinsr
I used Magick.Net to convert a JPG file to a PDF file.
But the Geometry and Resolution of the result file are changed by converting.
How can I keep the image quality?

Magick.Net:Magick.NET-7.0.4.700-Q16-x64
source:
using (MagickImageCollection images = new MagickImageCollection("test.jpg"))
{
// Save frame as pdf
images.Write("test.pdf"));
}

JPG file "test.jpg":
Geometry: 1664x2256+0+0
Resolution: 200x200

PDF file "test.pdf":
Geometry: 599x812+0+0
Resolution: 72x72

Re: Convert From JPG to PDF - Geometry and Resolution are changed

Posted: 2017-02-14T20:02:55-07:00
by fmw42
PDF files actually have no Resolution. You set the size when you either convert to another raster format or when you print. The PDF file is a vector shell containing the raster image from which it was created. So by default it gets the equivalent pixel size converted to a default density of 72.

The pixels size 599 = 1664 * 72/200