Images - PPI and DPI: Difference between revisions

From Scribus Wiki
Jump to navigation Jump to search
Line 27: Line 27:
|}
|}
====Implications in PDFs====
====Implications in PDFs====
{|
{|width=80%
|Here is a one-page document in Scribus containing only 2 image frames and these images. At the original image resolution, the top image was 2.6MB and the bottom 2.7MB, and the resolution as seen here was 648 DPI. When exported to PDF, the resulting PDF was 5.4MB in size.
|Here is a one-page document in Scribus containing only 2 image frames and these images. At the original image resolution, the top image was 2.6MB and the bottom 2.7MB, and the resolution as seen here was 648 DPI. When exported to PDF, the resulting PDF was 5.4MB in size.



Revision as of 00:05, 3 November 2008

For some, there seem to be some basic misunderstandings about images, PPI (pixels per inch) and DPI (dots per inch), and how this is considered in layout.

Starting with the Image Source

Let's imagine that we have taken a photograph with a camera. The camera will create an image file with a certain density of PPI, depending on camera settings. Once the file is created, this sense of density or PPI has no meaning, and what you really have is the data for an image having a width of a number of data points (referred to as pixels) of width, and a height of a number of data points.

At this point, the PPI is dependent on the display device and resolution. Here is an image cropped from a 37MB original, then scaled down for the wiki. After cropping but before scaling, it measured 1644 x 1048 pixels – amounting to a 2.75MB file. At the default settings, Scribus would import this and display at 72 PPI, so the image frame would need to be 22.8 x 14.5 inches (580mm x 370mm).

However, if we are going create a PDF for print, we want a DPI of 300 or greater. At this higher resolution, we would need a frame 5.5 x 3.5 inches (139mm x 89mm).

Try not to get rattled by image resolution!

Image Handling in Scribus

All of this becomes important in Scribus not only because of the resulting resolution, but also because of how Scribus loads and uses image files. Although the image data is not included in a saved Scribus .sla file, when you are loading a file with images, the images are loaded into memory (RAM, or RAM + swap). Modern computer systems may have 1-2GB of RAM or even more, but not so much older systems may have 500MB or less. Less than 500MB will likely be frustrating for using Scribus in general, but even 500MB to 1GB can overload memory for a document with many images. It certain won't take many 37MB images to cause trouble.

The answer to this is to crop whenever possible, and scale as needed, minding the final resolution required for your final PDF. Many image manipulation and display programs, such as Gimp, can show you this image information (press Alt+Return in Gimp to see it). This will show you your measurements at 72 DPI, and you can simply divide width in pixels by other DPI resolutions as needed. If you are already in Gimp you can then proceed to crop and scale as desired.

You can go the other way too. Let's say you have an image frame that must measure 4.5 inches (114mm) wide. For a PDF with 300 DPI, your image should be at least 300 x 4.5 = 1450 pixels wide.

PPI and DPI in Scribus GUI

ImageDPI2.png

You can obtain the above information by right-clicking on the image frame, then see in the Context Menu > Info. Actual PPI might be more appropriately termed Actual DPI when talking about output for printing.

Image tab in Properties

This information is in Properties > Image tab, where you can also adjust scaling in the final PDF.

Implications in PDFs

Here is a one-page document in Scribus containing only 2 image frames and these images. At the original image resolution, the top image was 2.6MB and the bottom 2.7MB, and the resolution as seen here was 648 DPI. When exported to PDF, the resulting PDF was 5.4MB in size.

Next, the images were halved in each dimension, thus the image file sizes became 879K and 806K, and then these replaced the originals, so Scribus showed 324 DPI for each. Now the resulting PDF was 1.7MB. The difference, doing the math, is almost entirely related to the image file size.

Obviously, when you have many large images, PDFs can become quite large.

ImageDPI3.png