Nature Photographers Network
This is the preserved archive of the original Nature Photographers Network. The community continues at naturephotographers.network.

200kb

Discussion

20 replies
Posted by Cliff Dodge on March 31, 2008 at 4:40 PM
I'm confused. I crop a picture, process it, and then downsize it for this website and it says it is too big. I dont crop a picture and process it and then downsize it and it downloads...? Can any one tell me what i am doing wrong? Thank you. Cliff
Posted by David Schoen on March 31, 2008 at 4:56 PM
depends on the photo. cropping has only a relative effect. it all depends on how much information is in the file when you optimize it to under 200 kb jpeg.

how are you converting to jpg?
Posted by Cliff Dodge on March 31, 2008 at 6:31 PM
Hi David. Well, lets all understand i am computer stupid....:) After i process in raw and ps2, i save as a tiff, then process it for the web in jpg and do all the color corrections and then save that large file as a jpg, then for my web site and here i downsize that to what Marc recommended, first to 1300 large size, sharpen, then to 600 on the long end, color adjust and save for web, and that usually works for me to put here. But if i do that with a cropped image....it doesnt work, and i have to make it smaller and smaller till it finally downloads here. So i dont know. :confused:
Posted by David Schoen on March 31, 2008 at 7:46 PM
Are you using Photoshop & which version?
Posted by Tom Kloster on March 31, 2008 at 7:56 PM
Check your resolution, Cliff - you might have it set for print quality. For screen quality, you can drop it to 72 pixels/inch.
Posted by Hans Sager on March 31, 2008 at 11:13 PM
Pixels are pixels. The size of the file doesn't change by varying the dots/inch (DPI) or pixels/inch (PPI). It only has an effect in printing. In other words, a 600x400 file at 300 PPI is no different in size than a 600x400 file at 72 PPI. Try making one of each and compare the size.

The only way to change the file size is by changing the physical number of pixels or the amount of JPG compression. When saving as a JPG in PS, changing the "Quality" number under "Image Options" will change the amount of compression.
Posted by John Williams on March 31, 2008 at 11:30 PM
What Hans said. I can't see how cropping would make a difference unless you save the file in a different way than if you don't crop.
Posted by Sean Watson on April 1, 2008 at 12:01 PM
Just to keep folks from scratching their heads... the image itself can play a big role in file size. Solid patches and gentle gradients compress really well. Lots of detail doesn't. For example, if you have a shot with a blank sky surrounding a tree with lots of high-detail branches, a tight crop on the tree followed by a resize will compress less well than a resize without the crop.

The more you understand, the better you can assert creative control over the way your images are rendered. (Makes you appreciate printed media, doesn't it.)

--- geek warning if your eyes glaze over skip to the end of the paragraph ---

A jpeg breaks an image up into little (64x64?) squares, walks each square by taking one pixel in the (top left) corner, then its neighbors in a diagonal, then the next diagonal, and so on. Looking at it that way, the picture is just a bunch of (4096 pixel?) runs where each pixel in the run next to pixels it was adjacent to in the original picture. Once you have that, it breaks the pixels down into channels. Then it finds the smallest number of terms it can to represent the channel values as a sum of smooth curves. (It starts with one flat curve and keeps adding terms until the difference between the approximation and the actual values is less than some value determined by the quality.) What gets written are the coefficients for those curves. (I'm saying all this from memory... look up DCT -- discrete cosine transform -- or just jpeg algorithim on the web for more details.)

--- end geek warning ---

Understanding at least a little about how jpeg compression works, you can control the process a bit by bluring less interesting parts of the picture (so they compress better) to allow for less compression (more detail) in other parts. Of course, you'd only do this if you're thinking of bumping down the quality to get under some file length limitation.

Sean
Posted by Tom Kloster on April 1, 2008 at 1:17 PM
Now I'm confused, Hans - I have this little chart stuck to my computer, and I'm pretty sure I've SEEN the effect of resolution on file size in my own web images. Maybe I didn't understand what you were saying - but why would anyone bother to reduce the resolution for web images if it didn't have an effect on file size?
Posted by Nancy Lamb on April 1, 2008 at 1:20 PM
Sean -- I now know your next career! Good job writing that up! It helps in a number of ways.
Posted by Cliff Dodge on April 1, 2008 at 3:41 PM
David, ps2. Tom, i will check into the resolution quality...., thank you. And Sean, the photo i was trying to download, cropped a little, was one of tree branches.....Hans, also will check into, so thank you all for the help. Will put it all to work and see what i can do....and remember, cliffy is not computer bright, but hey, i can type.... :rolleyes: thanks again! Cliff
Posted by Curtis Knight on April 1, 2008 at 5:34 PM
Tom,

Image Size (aka Print size) and File size, are independent of each other.
4" X 6" is the Image Size.
400px X 600px is the Pixel Count
200kb is the File Size.

Changing the DPI affects Image size, but does not affect File size.
the only way to affect file size, is by changing the Pixel Count.
DPI is pixel density, and does not affect Pixel Count.

The farther apart you spread the pixels, the larger the image (print) will be.
at 72dpi, you're spreading the pixels very wide apart.

In your chart, the image sizes are all the same, but the pixel counts are different. If the pixel counts were all the same and the image sizes were allowed to adjust for the DPI, you'd have identical file sizes.
Posted by Hans Sager on April 1, 2008 at 5:44 PM
Tom, I believe the table you have provided refers to scanning images. So, I will amend my previous statement to include scanners as well as printers. However, you will notice in your table that as you increase your scanning resolution you in turn also increase the height and width in pixels. Thus, it is ultimately the number of pixels that determines file size, not DPI/PPI. Below are a couple of links that provide a better explantation than I can make.

Sean also gives a good detailed explanation of how JPG file compression works, though it's probably more than the average person needs to know. The key is that the file size gets smaller with the greater amount of compression.

Before submitting my original post, I confirmed my statement. I created one 640x400 file at 300 DPI and another 640x400 file at 72 DPI. Both were saved at the same JPG compression quality "10." I then went to file explorer and checked out the file size--both were identical. Give it a try. Hope this helps.

http://photo.net/learn/resize/

http://www.ransen.com/Articles/DPI/Default.htm
Posted by Tom Kloster on April 1, 2008 at 9:46 PM
Thanks, Hans - I tried the same test, and also came up with nearly identical file sizes for images of the same pixel dimensions but with 312 vs 72 PPI. The images I tested were at medium compression, since I wanted to see if compression levels related to varying PPI settings differently - but no difference. The images are also indistinguishable on screen.

So now I'm really scratching my head, since saving down to 72 PPI also means that you can't enlarge that image (for screen uses). Maybe that's the point? Sort of a copyright protection? But here's where my confusion deepens: I resized the 72 PPI image to 312 PPI, then resized the 312 PPI image to the same pixel dimensions of the enlarged version of the 72 PPI image -- and they were comparable! I would have expected the higher-resolution image to have better resolution when enlarged. So... now I'm even more confused! :eek:

I think my mental block on this might be from filtering everything I've learned about digital photography through a mind that learned photography in a darkroom: I think of resolution as the tradeoff between detail and film speed, going back to how film grains work. So the advantage of shooting Kodachrome 25 back in my early days was that you could make much larger prints, or enlargements of cropped areas, where higher ASA films became grainy at similar enlargement. But it sounds like I need to relearn what resolution really means in practice.

While I'm confused, and we're on the topic, I'd like to hear a good explanation of the tradeoffs between lower ASA/ISO settings on a digital camera. I understand that at the higher speeds, there's a noise tradeoff that goes with the sensitivity. But what about between 100, 200 and 400, for example? Is the noise increase even detectable?

My brain hurts... :confused:
Posted by Hans Sager on April 1, 2008 at 11:51 PM
Tom, I am by no means an electrical engineer, but I'll give the digital camera ISO subject a try. CCD and CMOS sensors are analog devices whose signals are converted to a digital image using an analog to digital converter. Increasing ISO essentially amplifies that analog signal AND the background electrical noise present in all circuits. As you increase ISO (amplify), the low signal areas in the photo (the shadows) are often very close to the signal strength of the background electrical noise, thus you end up with randomly colored pixels in the shadows of your pictures. Camera manufacturers try to combat this using advanced noise reduction algorithms. From what I understand, Nikon has come up with some incredible algorithms for the new D3 camera thus making high ISO noise a thing of the past.

The link below has a more detailed layman explanation of high ISO noise on digital cameras.

http://www.photoxels.com/tutorial_noise.html
Posted by Tom Kloster on April 2, 2008 at 12:02 AM
Thanks, Hans - that's a great explanation!
Posted by Sean Watson on April 2, 2008 at 5:49 AM
Tom, there are a few overloaded terms here that would cause confusion.

Size: This can mean the number of bytes a file takes, the number of pixels a file has, or the area of paper a file would take if you printed it. These are related, but only loosely.

If you have a file that will print at 4x6 at 100 dpi, you have a file that is 400x600 pixels. But that 100dpi is just a recommendation. You can take a 100dpi, open it up, change the dpi to 300dpi and that just means the default print size will be 3x smaller on each side. You're not changing anything else. The main difference you'll see is the rulers on Photoshop will say it's 1.3x2 rather than 4x6. Browsers don't generally care about dpi at all. They just show 1:1.

On the other hand if you resample the image to 133x200, its taking a 3x3 square of pixels and replacing it with a single pixel. You're getting rid of about 90% of your data. That'll make a huge difference in your image quality and your size in bytes. If you don't change the dpi, this will also cut the print size to 1.33x2, but the print will have much less info in it. 100dpi isn't bad (but also isn't great) so your print will look reasonable. But if you try to print it as a 4x6, you'll need to print at 33dpi which will look pretty bad.

Now, getting rid of pixels is only one way to make the file smaller. Another would be to reduce the quality of the image to get better compression. In this case, you'd still be tossing away detail, (and lots of it to get 9:1 compression). But instead of just replacing every 3x3 pixel cell with an average, you'll get a more global approximation by smooth curves. If your image has lots of subtle gradients, the smooth curve approximation may seem great. On the other hand, if it's got lots of edges and contrast, it may look blurry and awful with lots of compression. When you reopen the image, it'll still be 400x600 at 100dpi but it'll have detail removed through blurring. Generally, jpeg compression works better than downsampling, so printing the reopened jpeg will look better than the 133x200 image you printed at 33dpi.

Resolution: The seconds overloaded term is resolution. The resolution of a file or a monitor or a sensor is generally the number of pixels. But the resolution of a scan or a print is its dpi. These are related, but are definitely different things, It's unfortunate the same term is used. As a trick question, is a D3 the same resolution as a D2x? You could say yes because they're both 12Mp. You could san no because the D2x spreads its 12Mp over a smaller area (and is therefore higher resolution).

Hmph.... words. Hope this sheds more light than it occludes. Aren't you glad you can communicate nonverbally? :razz:

Sean
Posted by David Schoen on April 2, 2008 at 1:40 PM
very elegant and excellent explanations.
In PS2, I use convert (or save for web) for web, which if set up properly, allows you to change your tif image into a jpg and adjust the file size with a slider in the upper right hand corner. you will see the final file size as a jpg in the lower left corner. save the inage as a jpg below 200 mb and you should have no problem posting...
Posted by Tom Kloster on April 3, 2008 at 1:14 AM
I use that feature, too, David - my only complaint is that it seems to display a slightly washed-out version of the image in the save for web preview window, though the actual saved image is true to the original. This might be a relic from my somewhat dated version of the Adobe suite.

Thanks, Sean - excellent explanation!
Posted by John Lehmkuhl on April 6, 2008 at 3:52 PM
If you crop, be aware that there is a box that says what the dpi of the crop will be. This means that if it is set to 72 dpi that the crop will be far less resolution than if it is 300dpi.

Save for web is very useful for posting at NPN since EXIF data is not read and you have to make it fit under the paltry 200K size limit which Save for Web will tell you the exact size of the file while you change the quality of the JPEG. Maybe someday this site will upgrade to an easier to accomplish image size (I keep dreaming....)
Posted by Rick Lamb on April 7, 2008 at 12:57 AM
My way of getting around the 200kb limit is to host my posted images on our website (ramblinlamb.com) instead of the NPN website. But I DO still try to hit the 200kb size generally speaking because it allows my images to load in a reasonable time for those without broadband. Having the freedom to go beyond 200kb is nice. I understand that not everyone has that luxury though.

Sean you explanations are wonderful and greatly appreciated!!