The Compromise of the Jpeg Format

As mentioned in the digital formats blog last week, each time you edit and save a jpeg file a process takes place that aims to reduce the size of the resulting file. This entails making some approximations about the content (the colour) of some pixels. Repeatedly saving a jpeg file will, therefore, degrade its quality.

Whenever you save a jpeg file, most programs will offer you a choice as to the trade-off you would like to make between the size and the quality of the file you are going to create. In the illustration here, I am choosing to save the best quality file, but it will be the largest. I could change my choice by moving the slider, entering a different number, or choosing a quality other than “maximum”. This illustration is from the Photoshop program. Different programs offer variations on this, but the result is always that you are making a choice between quality and size of file.

Jpeg quality versus file size

Note: merely viewing your jpegs (as opposed to editing and then saving them) will NOT degrade the image. And neither will time! Real, hard copy photographs do degenerate over time as chemical processes take their toll. Digital images on your computer will not suffer this fate.

 

Images as Email Attachments

If you are intending to send an image file as an attachment to an email then size matters. An image of acceptable quality saved as a jpeg could be 200kb or smaller, whereas the tif equivalent could be 20mb. The former would be perfectly acceptable as an email attachment, whereas the latter may not be delivered. As far as emailing jpegs is concerned, you can almost always save the jpeg at its highest quality and still have a file that will comfortably go through the email system. You can see in the first illustration that the file I am saving here would be 153.0k. This would be perfectly acceptable as an email attachment.

Quick reminder on file sizes: there are approx 1000kb in 1mb (one thousand kilobytes in a megabyte). An email attachment can be 5mb without causing problems and some email systems can handle attachments up to 20mb. Therefore, any file size that is expressed in kb (and is less than 5000kb) is less than 5mb. Therefore, any file size expressed in kb (provided that it is less than 5000kb) will be ok to send by email.

The Best of Both Worlds

If you only intend to edit a photograph once or twice then it’s probably OK (quality-wise) to save it each time as a jpeg. The quality will remain acceptable and it won’t cause problems by being too large. If, on the other hand, you are going to do a lot of editing, spread over several sessions, then it is worth getting to grips with how you can save an image in a “lossless” format such as tif or bmp, so that it doesn’t degrade each time you save it. When you have finished editing it you can save the final version as a jpeg so that you then get the benefit of compressing it without all the intervening stages of degradation. If you do this, by the way, you will finish by having a file in each of the jpeg format and the “lossless” format.

Whatever program you are using to edit your pictures, the way to save an image file in a different format is to find the command to “save as” (as opposed to the “save” command) and then look for an option to allow you to change the format. This illustration is from Photoshop:

Saving a file in a different format

In this instance, clicking on the triangle to the right of the “Format:” line offers many options for saving the file in a different format, including tif. When you have finished all the editing and want to create a final, smaller, jpeg file then just issue the “save as” command again and choose jpeg as the final format.

Zipping Image Files

Files can usually be compressed into smaller sizes by putting them into zip files (or other compressed formats such as rar). These can then be sent more easily through the email system. Zipping also has the advantage that only one file is sent, so it is easier to handle than trying to attach, say, 20 photograph files. The recipient then “unzips” the file back into its original components.

There is no reason why you cannot put jpeg files into zip files, but you won’t save much space. The jpeg has already been optimised, so the process of “zipping” it won’t squash it much more – if at all. Zipping “lossless” files (such as tif files) will reduce the overall size considerably and won’t compromise the quality of the image.

Having said all that, there are now many alternatives for showing other people your digital photographs that don’t involve trying to send them through the email system, so if you regularly send lots of images it’s worth considering them. These alternatives include posting images on your social media page (eg Facebook), storing them online on Microsoft’s Skydrive system or Kodak’s online photograph album system, or even creating your own photo website.

There are lots of other aspects of digital images that we could look at, so I think we will be returning to this subject before very long.

In the meantime, you can find more information on jpegs here.

Have you ever had trouble sending a large email attachment? If you try to send an attachment that is too big then you may find that it bounces back to you (ie you receive a message saying that the message could not be delivered). The limiting factor may be in the recipient’s email system or in a system that the email (with attachment) has passed through on the way to the recipient.

You are not likely to encounter this problem if you are just sending average-sized spreadsheets, word processing documents or pdf files, but “media files” such as video clips, sound files, and many high-resolution picture files can very easily be far too big to send as attachments.

Large AttachmentsHow do I know the size of an attachment? This depends on the email system you are using. In Hotmail, for example, after you have added the attachment to the email you can hover your mouse over the attachment and a small box will pop up that includes the file size (eg 273kb). With most other systems the size of the attachment is shown in brackets after the name of the attachment.

What is the maximum size of an attachment? Hotmail is supposed to be able to receive 10mb attachments, Yahoo and Gmail have a limit of 25mb. These are all webmail systems. If you are using POP-based email (eg you check your email using Outlook or Windows Live Mail) then there is probably a limit set by the email servers you are using. If you have your own domain name then you are probably using your domain host’s email servers. Otherwise, you will be using your ISP’s servers. The limit they impose can be as low as 5mb. Also, the theoretical limit of a Gmail attachment is 25mb but the actual file sent through cyberspace is larger than your original file by up to about 20% so Gmail’s actual maximum is probably nearer to 20mb. Anyway, even if you know the limits of your own system, that doesn’t help in telling you what your correspondent can receive as that depends on their system rather than yours. Personally, I would not assume that an attachment of over 5mb is going to go through without trouble. I always check with the recipient that they have received anything I have sent bigger than 5mb. Note: there are 1024kb in 1mb, so if your attachment size is expressed in kb rather than mb then anything less than about 5000kb is less than 5mb and will probably be delivered without problem.

What can I do if my attachment is too big? There are several options:

  • split the file up into smaller pieces. There is software available for splitting and rejoining files. I don’t recommend this method.
  • compress the file into a (smaller) zip file. This can work very well for some file types (eg tif files) but not have very much effect on others (eg jpg picture files, that are already optimised for the trade-off between size and quality). Zip files are a good idea, by the way, if you are sending many attachments as they can all be sent in one zip file for unpacking at the recipient’s end.
  • use an online service such as www.goaruna.com

Using GoAruna, you don’t even have to register if you just wish to send a single file. All you need to do is enter your own and the recipient’s email addresses and upload the file you wish to attach. The recipient is then sent an email with a link so that they can download the file. Although there is a time limit (seven days) on the availability of the download, this method does have the advantage that the download is under the control of the recipient. This can be better than having their email system tied up while a large attachment download takes place (although this is becoming less important as internet connections become faster). A single file sent this way by GoAruna can be up to 100mb. By registering with Aruna, you can also have 2gb of online storage. This can be used for backups and/or making files available to other people that may otherwise have needed to be sent as email attachments. Note: just as there are 1024kb in 1mb, there are 1024mb in 1gb.

There are other services similar to GoAruna. You may like to look at these:

http://www.yousendit.com
http://www.gigasize.com/index.php

© 2011-2017 David Leonard
Computer Support in London
Privacy Policy Suffusion theme by Sayontan Sinha