Difference between revisions of "How to Change Pictures so They Don't Take Up So Much Space"
m (8 revisions)
Revision as of 03:06, 11 July 2011
How to Change Pictures so They Don't Take Up So Much Space
A good picture can be a major enhancement to a presentation or report. However, in many cases this enhancement comes at a heavy cost in terms of the size of the work product.
This page will explain to you how you can still have good looking pictures in the work you submit, but make the pictures much more efficient in storage space.
For most of this page, we'll use pictures taken in the EG1003 lab sessions as examples, but the principles are true for any picture.
When you use a digital camera, one measure of the quality is the number of megapixels (also known as pels) that it produces. A megapixel is approximately 1,000,000 pixels. If you were to take a picture and divide it up into a grid, a pixel is one of the grid intersections. The way this intersection is filled is the same for the entire intersection. For example, suppose you took a picture and divided it into a grid that was three rows by four columns. This would make a total of 12 intersections, and this picture would contain 12 pixels. As you can imagine, a picture with so few rows and columns, and therefore pixels, would be very grainy, to the point where you might not recognize it. All the picture would contain would be 12 big boxes of color. Now, suppose you had the same picture and divided it up into 300 rows and 400 columns, giving 120,000 pixels. This picture would look much better. Notice that even with so many rows and columns we still have only 120,000 pixels. The cameras in the EG1003 laboratories have a resolution of roughly 5,000,000 pixels, so you can see they have many more rows and columns.
Why is it good to have more pixels? For a standard photograph, there are many more rows and columns in the photograph than the printer can print, so you can't see how fine the detail is. However, if you like the picture you might want to enlarge it into a much larger photo or even a poster. Since the photo has the same number of rows columns that were captured when the picture was taken, you need all these rows and columns (and a large number of pixels) so that when the picture is enlarged there will be enough rows and columns that it will still look good. As an example of this, next time you're in a classroom or lab and the video projector is on take a look at the screen from a distance. Then go right up to the screen and take a close look. On many projectors you can see the grid, and how each square is fully filled in. As you get closer, you can see the rows and columns, so when you're close to the screen the image is larger and the relatively low resolution of the projector becomes clear.
The resolution of many video projectors is 768 rows by 1024 columns, or 786,432 pixels. This means that the 5 megapixel resolution of the digital camera is much higher than what the projector can show. The same is true for a printed report a laser printer typically can print about 600 rows or column per inch of paper so, in many cases, the digital picture you include in your lab report is a much higher resolution (has more rows and columns per inch) than the laser printer can produce. In both cases, the result is that the output device (projector or printer) simply throws away the resolution it can't handle, making a lower quality image (that still looks good), wasting all the extra resolution the camera produced.
In an attempt to save space, the camera "compresses the image", meaning that it removes "unnecessary" details that you won't notice. This compressed format is called JPEG (and has a file extension of JPG when you download the file). JPEG stands for Joint Photographic Experts Group, which is an industry trade group that defined the format to make the file much smaller with minimal loss of detail. You can get more detail on this picture format and others by reading the page How to Capture PC Screen Images elsewhere in this manual.
Therefore, what we'd like to do is read this high resolution JPEG image and reduce its resolution to something that can be fully displayed. This will reduce the number of pixels, making the image smaller. Also, images with fewer pixels frequently compress better with JPEG, giving us even more space savings.
Fortunately, there are a number of utilities that perform this function. We'll cover several of the more popular ones, but you should have no problem finding others.
Adobe Photoshop is the industry standard for photo editing and manipulation. Although it is quite expensive, it is considered a necessity for graphic design. Knowledge of its many uses can greatly improve aesthetics of an engineer's presentations, reports, products, etc.
There are two steps to compress an image:
- Reduce the size of the image
- Reduce the quality of the image.
To start Photoshop, go into the start menu and select "Adobe Photoshop", which will bring up a popup list. On this list, click on "Adobe Photoshop".
To reduce the size of the image, you first need to open it. On the top toolbar, click File, and on the dropdown menu Open. This will bring up a popup window of your files. You may have to navigate to the proper directory to see your images. When you see what you want, double click on it. Next, select the entire image by pressing Control+A (there should now be moving dashes around the entire image). Then, on the toolbar, click on Edit, and on the dropdown menu select "Transform", then select "Scale". The image should now have a small box in each corner. To adjust the size, pick a corner, then click and drag it to make it as small or as big as you want (if you wish to keep the exact ratio of the original picture, hold the shift key as you are dragging the corner of your choice). When you have finished resizing, either click the check mark on the top toolbar, or any button on the tools palette to exit the transformation.
Next, copy the image you have just resized by pressing Control+C (it should already be selected). On the top toolbar, click "File", and on the dropdown menu "New", and hit OK (do not adjust the settings, they should already be set to your copied image). Paste the image (Control + V). Next, on the top toolbar click "File" and on the dropdown menu click "Save As". Next, you can select the output file format if you want, with JPEG being the default. Once again, read the page How to Capture PC Screen Images for more information about the advantages and disadvantages of each format.
For this paragraph, we'll assume you chose the JPEG format, but other formats work in a similar way. The next part is the saving process is where you may or may not choose to change the image quality of not. After you have chosen the output format, choose where you want to save the image, and hit OK, a window will popup called "JPEG Options". It will have a slider on a scale from 1 to 12. The highest quality image would be a 12, where it would make the image very crisp and clear; however the file would be quite big (the actual size will be indicated on the bottom of the window). The lowest quality is a 1, where the image will become blurry and unpleasant to see, but the size will be tiny (as indicated on the bottom of the window). The quality of the image however, changes as you move the slide. So play around with it and see where you get the best image quality to file size ratio. Finally, hit OK and you have just reduced the size of your image and kept its quality.
Microsoft Office Picture Manager
This program has one major advantage. If you have a full copy of Microsoft Office Professional, you got it for free. To find the program, go into the start menu and select "Microsoft Office", which will bring up a popup menu of the Office components. One item on this list is "Microsoft Office Tools". When you click this item, you'll get a list of programs, one of which is "Microsoft Office Picture Manager". When you click on this program it will start, and possibly show you pictures in your "gallery". If you don't see the picture you want to work with, you'll have to add it (and all the other pictures in the "folder" it resides in) to your "Picture Shortcut" list. Probably the easiest way to do this is to move the picture from wherever it is into your "My Pictures" directory. The "My Pictures" directory is always part of the gallery, avoiding a situation where you have to keep adding folders, until essentially the entire computer is your picture gallery.
Once you see your picture in the gallery, click on it. This will highlight the picture, and also give you some information about it on the right side of the screen. If you don't see the information, double click the picture to get a larger size, and then double click the larger size to get the information. You'll probably see that the image has a very large number of rows and columns, and uses a storage space measured in megabytes. Now you can see why a document containing just a few pictures can be very large. Also, this resolution (the number of rows and columns) is much more than we need.
We'll now make a new image that's much more efficient. On the top toolbar, select "File" and "Export". The right side of the screen now shows how the image will be stored. One warning – if you use the same name and type, the original image will be overwritten, and you probably don't want to do that. Be sure to change the name. When you change the name the "Use Original Filename" box will automatically be unchecked by the program. Next, you can select the output file format if you want, with JPEG being the default. Once again, read the page How to Capture PC Screen Images for more information about the advantages and disadvantages of each format. Finally, you can select the "size", which will be the resolution of the new image. Click the arrow on the right of this box to display a dropdown menu. If you select "Document (800 x 600 px)" or "Web (640 x 680 px)", (px is an abbreviation for pixel), the result should have adequate resolution. The result will be an image that looks just as good, but which uses MUCH less space.
Microsoft Digital Image Editor
This program frequently has an advantage on price. Microsoft was a little late to compete in the image arena, and therefore frequently discounts this powerful package so they can compete with more established packages such as Adobe Photoshop. To find the program, go to the Start Menu and select "Microsoft Digital Image Suite" (possibly followed by a year as a version number. Click on this item and the next level dropdown menu will appear. Click on "Microsoft Digital Image Suite Editor" to bring up the picture editor you need.
Usually there's a "splash screen" in the middle of the window, and one of the icons in the screen is "Open". If you don't have this, you can use the toolbar at the top. By default, this will show the contents of the "My Pictures" folder, so it would be a good idea to have your picture in that folder before you start the program. When you see the picture, double click on it to open it and prepare it for editing.
On the toolbar click "Format" and "Resize Image". This will bring up a toolbar on the left side of the screen, and it will also show the number of rows and columns in the image. Whatever is selected will be "locked" and cannot be changed until something else is selected. Click the "pixel dimensions" radio button, which will allow us to change the resolution. Next, change the resolution from whatever it shows down to a more reasonable number, such as 600 pixels per inch. Note that the image size is probably now much larger than it was before. What this did was essentially enlarge the image, but at least we have the resolution at a value we like. Next, click on the "Resolution" radio button. This will lock the resolution to the value you chose. We can now change the rows and columns to a more reasonable value. First, make sure the "maintain proportions" check box at near the bottom of the list of items is checked. If it isn't, check it. We don't want to distort the image. We'll now change the picture's dimensions to more reasonable values. This will change the number of rows and columns in the picture. As a start, look at the two numbers, and change the larger one to 1024, and then select the other value. Note how the other value has changed in order to keep the image the same shape. Also, not how the dimensions of the picture have changed to reflect the new number of rows and columns at the resolution you chose. At this point, you probably have what you need. Click on the "Done" button at the very button of the toolbar. The toolbar disappears and you now have nothing but your picture showing.
On the top toolbar, select "File" and "Save As". A popup window now shows how the image will be stored and the filename, which is the same as the original. One warning – if you use the same name and type, the original image will be overwritten, and you probably don't want to do that. Be sure to change the name. Next, you can select the output file format if you want, with JPEG being the default. Once again, read the page How to Capture PC Screen Images for more information about the advantages and disadvantages of each format. Changing the name if you want, click "Save" and you'll save an image that looks just as good, but which uses MUCH less space.
There are a number of utilities that perform this function available on the Internet. IrfanView is a utility with a major advantage – it's freeware. This means that you can legally use it without paying for it. You can find this utility by using it for a search on any of the major search engines. The following URL will probably work as well:
After you've downloaded and installed the software, it's ready to go.
To find the program, go to the Start Menu and select "IrfanView" (possibly followed by a year as a version number. Click on this item and the next level dropdown menu will appear. Click on "IrfanView" (possibly followed by a version number) to bring up the utility. A black window appears. Click on "File" and "Open" just like any other program. The utility will usually start out on the C drive, where the program was installed. You'll now have to navigate to the directory where your picture is and double click on the picture.
IrfanView will display the picture at full resolution, which means that usually you'll see only a small part of the picture on the screen. Click on "Image" on the toolbar at the top of the screen and "resize/Resample" on the dropdown menu that appears. This will bring up a popup window containing information about the picture, plus ways to change it. First, make sure the "preserve aspect ratio" check box in the bottom left corner of the window is checked. If it isn't, check it. Just below it is a box with a label of "DPI:" and a value. Since this resolution is probably too high we'll change the image to something more useful that still meets our needs.
On the right side of the windows are various image sizes. If you choose "800 x 600 pixels" the result should have adequate resolution. The result will be an image that looks just as good, but is more efficient.
On the top toolbar, select "File" and "Save As". A popup window now shows how the image will be stored and the filename, which is the same as the original. One warning – if you use the same name and type, the original image will be overwritten, and you probably don't want to do that. Be sure to change the name. Next, you can select the output file format if you want, with BMP being the default (NOTE: YOU PROBABLY DON'T WANT TO USE THIS FILE TYPE!). Once again, read the page How to Capture PC Screen Images for more information about the advantages and disadvantages of each format. If you're not sure what file type to use, PNG is a good choice. Changing the name if you want, click "Save" and you'll save an image that looks just as good, but which uses MUCH less space. Note where the utility saves the file; it will probably be somewhere different than where you loaded the picture, most likely in "My Documents".