Pages: [1]   Go Down
  Print  
Author Topic: Photo Tutorial: Image File Basics - Key Steps to Reducing File Size  (Read 1997 times)
0 Members and 2 Guests are viewing this topic.
Dan Clark

Online Online

Location: Bellevue, WA USA
Member Since: Jul 2009
Posts: 393



WWW
« on: February 25, 2007, 05:54 PM »

Prepping Photos for the Forum

Detailed steps in the basics of editing photo images ("post-processing") will be posted in another a tutorial, but this tutorial will also cover the last few steps necessary to reduce the size of an image.  Like all forums that allow images, this forum has limits on file size and type.   It is important to make sure that your photos meet these limits.

Workflow Summary
Like any process, a key issue is efficiency.  A suggested workflow:
1) Open image and check/adjust exposure.
2) Crop
3) Resize
4) Sharpen
5) Change image to 8 Bits/channel mode (I shoot raw)
6) Reduce color density (Save for Web in PhotoShop Elements)

File Type

For photo images, "JPEG", "GIF", and "PNG" files are the photo file formats supported by this forum.   Respectively their 3-digit file extensions are ".jpg", ".gif", and ".png".   For example, if a file is named "MyPic.jpg", the ".jpg" indicates that the file is formated in JPEG format.  JPEG-formatted files are by far the most common format generated by digicams.   

The "GIF" format is very good format for limited-color drawings and simple images.   It's advantage is that it's file size is typically smaller.  "PNG" is also a useful format for some images. Some cameras produce "RAW" formatted files.   If using any of these formats, convert them to "JPEG" format for this tutorial.

Note that you can upload .pdf (PDF documents) and mpg (videos) files but those are another topic that's out of scope for this tutorial.

File Size

Like most forums, this forum limits the number and size of uploaded files.  If your file is larger than that it won't upload.   Check these before uploading.  For purposes of this tutorial, we'll assume that the size limit is 150KB.   You MUST reduce your image size to this limit.

So what affects file size?  Three things - number of pixels in the file, number of colors (bits per pixel), and quality.    You can use Photoshop, IrfanView (and other editors) to change these.  (See below for instructions.)

  • Number of Pixels - You've probably seen terms like "5 Megapixels" and "800 X 600".  The first is typically used in the camera world; the second typically refers to monitor resolution.  Even earlier model digicams produced 2 megapixels (two MILLION pixels).   This is the size of the image your camera produces.   Large number of pixels = large file size.

  • Number of Colors - Cameras produce images with millions of colors.  Large number of colors = large file size.

  • Quality - Cameras produce very high quality images.  High quality = large file size.


My wife's 5 megapixel Sony digicam creates two megabyte files - WAY larger than you can upload.  These files are saved at full size and full resolution (5 megapixel), with the maximum number of colors, at the highest quality level.   That's the start.   

But that size, quality, and color density is NOT necessary for publishing to the web.   99.9% of the time, you don't want this for your images.   A 2500 X 2000 pixel image is too large for the screen, the files size is too large to upload, and most people could never tell the difference in image quality.   So, manipulating the file's number of pixels, number of colors, and quality to acceptable limits are the keys to reducing your file size for publishing.

Key Steps to Reducing File Size

1) Crop out the extraneous - Cropping is like using scissors to trim a paper picture.  It reduces image and file size.

2) Reduce the image size - Most editors have the ability to reduce the size of the image.  The simply eliminates some pixels.   This makes the image look smaller on your screen and reduces the size of the file.   A good size for publishing is probably about 500 to 800 pixels height and/or width.   Much larger than about 900 pixels may make it a bit difficult for some people to display on theirs screens.  Much smaller than about 400 pixels doesn't show enough details.   I aim for about 440X400 for inline pics and about 800X600 for attached pics.

Here's a pic of my drill at 444 (height) by 430 pixels:
   

That's not too bad, but here's the same pic at 800X600:
   

Which one is better?  Well it depends...   The bigger pic shows much more detail.  But it also shows the warts.   The screw bit in the chuck looks decently sharp at 400 pixels, but shows that it is out of focus at 800 pixels.   

3) Save for web/reduce quality - Different editors use different terms, but most will allow you to reduce the quality level and number of colors for web publishing.   In PhotoShop Elements for example, you "Save for Web".  You can change the "Quality" slider and see the file size go down.  When you zoom in, you'll see the colors get a bit blocky and the image gets grainy, but it's still OK for publishing.

4) When the file is at the correct size and you're happy with the looks.  Save the file to a NEW FILE NAME.  By habit, I choose a name something like "<original file name>_Reduced".   E.g. if original file is "MyPic.jpg", the reduced file would be "MyPic_Reduced.jpg".

« Last Edit: July 04, 2007, 10:37 PM by Dan Clark » Logged
Dan Lyke

Offline Offline

Location: Petaluma, CA
Member Since: Jan 2007
Posts: 324



WWW
« Reply #1 on: February 26, 2007, 04:57 PM »

We've mentioned JPEG quality, and the fact that you can change it when you save a JPEG.

Here are some examples of different quality settings. As you mentioned, every application scales its slider slightly differently and calls the quality setting something else, but these are created with GIMP and should be instructive.

JPEG images are stored in little squares, and within each square the image is broken down into black and white values and two color channels. Then each of these is broken down into frequency bands, kind of like figuring out which notes make up a chord, and various "notes" are thrown away until the desired quality setting is hit.

We humans notice changes in intensity (black and white) far sooner than we notice certain color changes, and we notice blue color changes far less than green. So there's actually quite a bit of information in an image that can be thrown away before the image starts to look bad, and since larger image sizes cost money in terms of hard drive space and bandwidth to show them on web pages, it's a good thing to make the images as small as possible before uploading them to a web site.

Here, for your perusal, are the same image saved 5 different ways. The first came off of one of my digital cameras, a cheap HP Photosmart M525, allegedly "6 megapixels", although that's a discussion that needs a lot of nuance, but this picture came off the camera at 2800x2128 pixels, with the "fine" quality setting, as good as the camera can do, and was then resized to 320x240 and saved out with a "100" quality setting:



This is overkill, and you probably can't notice the difference between it at the same image saved at about "85" or so. In fact, if we look at one saved out at a "75" quality setting:



My hair gets a little fuzzy, there's some detail loss on that box on the shelf on the top right and on the tools and stuff lying on the table, but you may not even be able to see this without additional tools.

However, by quality setting "50", we start to see lots of stuff:



My eyes are blurry, there's some color fringing around the band strap, and the shadows around my arm are a little more prominent. Which takes us to quality setting "25":



Where any detail in my hair has completely disappeared, and the bottom part of my shirt and the pockets and belt loops on my jeans are starting to turn into some sort of impressionist painting. And the colors are starting to have a lot of noise in them, like a bad TV signal.

To see this taken to its extreme, lety's go to quality setting "0":



At this point almost all of the color information has been thrown away, and most of the black and white signal too. There's some gradient information up there by my ears, but now if you start to look backwards through the images you can see the progression that lead us to this point.

Hopefully this will help you keep the images you share small, while helping you figure out why they're ugly when they end up ugly.

« Last Edit: June 26, 2007, 02:39 PM by Dan Lyke » Logged

Accomplished computer geek, novice woodworker, road cyclist, in Sonoma county, northern California.
Dan Clark

Online Online

Location: Bellevue, WA USA
Member Since: Jul 2009
Posts: 393



WWW
« Reply #2 on: February 27, 2007, 03:03 PM »

Dan,

This is excellent work.  My hesitation is not IF we add this, but HOW we add this.   It is so good, that I think it needs a separate section.   I'm thinking that we can add this as a new section between: "Image File Basics - Type, Size and Key Steps to Reducing File Size" and "Downsizing Images in PhotoShop Elements".   

What do you think?

Dan.
Logged
Dan Lyke

Offline Offline

Location: Petaluma, CA
Member Since: Jan 2007
Posts: 324



WWW
« Reply #3 on: February 27, 2007, 03:42 PM »

I'm thinking that we can add this as a new section between: "Image File Basics - Type, Size and Key Steps to Reducing File Size" and "Downsizing Images in PhotoShop Elements".

This is why I like Wikis, they allow a little more structure in how we toss these things around. Of course we're kind of using the forum like a Wiki anyway, so we should probably go forward with it that way.

I think that's a great place to do it, with the caveat that this is kind of an advanced topic, you don't necessarily need to dive into this immediately (although I would like to see Per Swenson up his quality settings a little bit so his photos have less artifacting), otherwise we end up overloading people. So maybe move this to a place where we start to delve into advanced topics in image prep (although at some point we go way beyond Festool stuff there)?
Logged

Accomplished computer geek, novice woodworker, road cyclist, in Sonoma county, northern California.
Michael Kellough

Offline Offline

Location: The northernmost end of the southernmost county of New York
Member Since: Jan 2007
Posts: 2121


« Reply #4 on: February 27, 2007, 03:47 PM »

I'm thinking that we can add this as a new section between: "Image File Basics - Type, Size and Key Steps to Reducing File Size" and "Downsizing Images in PhotoShop Elements".

This is why I like Wikis, they allow a little more structure in how we toss these things around. Of course we're kind of using the forum like a Wiki anyway, so we should probably go forward with it that way.

I think that's a great place to do it, with the caveat that this is kind of an advanced topic, you don't necessarily need to dive into this immediately (although I would like to see Per Swenson up his quality settings a little bit so his photos have less artifacting), otherwise we end up overloading people. So maybe move this to a place where we start to delve into advanced topics in image prep (although at some point we go way beyond Festool stuff there)?


Keep it up as long as you want guys. I'm looking forward to taking the time to read through your tutorials carefully and learning some stuff.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: