Why JPEG is “Lossy”

Facebooktwitterlinkedin

Today’s Question: I recently received some files from a local museum that looked to be very small at less than 1 MB in size. When I opened them they had more data than I expected. They were saved originally with a Quality setting of “8”. What data quality is lost when images are saved at a lower JPEG quality setting? When the file is reopened do we get the lost detail back?

Tim’s Quick Answer: When you save an image as a JPEG file, the Quality setting determines how much compression is applied. The number of pixels does not change, but the actual pixel values do. Thus, quality is lost, and that quality can’t be improved for that version of the image file.

More Detail: Compression for JPEG images operates by essentially “simplifying” the pixel values in the image. This is typically done by dividing the image into blocks of pixels in a 16×16 grid. That means there are 256 pixels within each block. The JPEG compression will actually alter the pixel values within each block of pixels. The pixel values are “simplified” so those pixel values can be described more efficiently. This is how a smaller file size is achieved.

When a lower Quality setting is used, there is more simplification of the data applied for each block in the pixel grid. In other words, the file size is compressed more, but the quality is reduced in the process.

When you save a JPEG image, the compression is applied to the actual pixel data. That data can’t be magically reconstructed when the image is opened again. In other words, compression will permanently reduce the quality of a JPEG image. This is why JPEG compression is referred to as “lossy” compression. Quality is lost to at least some extent whenever you save an image as a JPEG file.

Flattening Workaround

Facebooktwitterlinkedin

Today’s Question: I totally agree with you that I never want to use the flatten function in Photoshop. Sometimes, though, I want to select exactly what I see on the screen for an area, but going to the top layer, even with “Current and Below” it doesn’t grab what I’m seeing. I have to flatten the image, make my selection, copy the pixels, and then undo the flattening. This works but it’s both inconvenient and a little risky that I’ll somehow do something wrong and lose the layers.

Tim’s Quick Answer: This is a good example of a situation where you would want to use a new “Merge Visible” layer. This is a layer that represents the composite contents of all layers below, which you can then add a layer mask to if you only want the effect to impact a portion of the photo.

More Detail: This question was a follow-up to an answer earlier this week about flattening images in Photoshop. As I mentioned in my original answer, I prefer to never flatten a master image. Instead, I keep all layers intact to maximize the flexibility of my workflow.

In some cases you may find that you can’t really work with certain features (such as filters) when you have multiple image layers. In that type of scenario you can instead use the “Merge Visible” command to create a layer that represents the net result of all layers below.

To get started, click on the thumbnail for the top-most layer on the Layers panel to make that layer active. Then click the “Create New Layer” button (the blank sheet of paper icon) at the bottom of the Layer panel to create a new empty layer at the top of the layer stack.

Next, go to the Layer menu on the menu bar. Press and hold the Alt key on Windows or the Option key on Macintosh, while selecting “Merge Visible” from the Layer menu. This will cause the composite contents of all visible layers below to be created on this new layer (rather than flattening all visible layers).

Note that because the “Merge Visible” command applies only to visible layers, you can prevent certain layers from being included by simply turning off the visibility for those layers.

You can then apply any effects you’d like to the new composite layer. If needed, you can also add a layer mask so this layer is only visible in certain areas of the image. Note that because this layer will block all layers below, if you need to make changes to any work you performed before creating the “Merge Visible” layer, you’ll need to turn off the visibility for the “Merge Visible” layer to be able to see the effect. You might also need to create a new version of the “Merge Visible” layer so that it will reflect any changes you’ve made to layers below.

Import Backup Limitations

Facebooktwitterlinkedin

Today’s Question: Does the GoodSync backup work better than making a second copy upon import [into Lightroom]?

Tim’s Quick Answer: The advantage of using backup software like GoodSync (http://timgrey.me/greybackup) is that the backup will be an exact copy of your source photos, including folder structure. The option to create a backup copy while importing photos into Lightroom will not provide a folder structure that matches your source photos.

More Detail: I am certainly grateful that there is an option to create a second copy of the photos you are downloading as part of the process of importing new photos into your Lightroom catalog. However, I do wish that this backup reflected the same folder structure as the source photos. Instead of making a second copy of the photos into a folder with the same name being used for the original photos, a folder will be created with the name “Imported On” (with the date of import appended to that text).

The result is that the backup copy created during import isn’t an exact reflection of the source photos. Therefore, while I do make use of the option to create a second copy of the photos being imported during the import process, I treat that as a “temporary” backup.

After the import is complete, at my earliest opportunity I will use GoodSync (http://timgrey.me/greybackup) to synchronize the external hard drive containing my photos with a backup drive. The result is that the backup of my photos drive is an exact copy of the primary drive, including folder structure and filenames.

Once you have configured a backup job using GoodSync, you can simply run that job to have the backup drive updated to once again represent an exact copy of the source drive. To me this is an ideal scenario for a backup, since it greatly streamlines the process of recovering from a hard drive failure.

Note, by the way, that I have produced a video course with lessons that outline the approach I use for GoodSync, which you can find on the GreyLearning website here:

https://www.greylearning.com/courses/goodsync