Pages: [1]   Go Down

Author Topic: Sizing for the web  (Read 1212 times)

Waeshael

  • Newbie
  • *
  • Offline Offline
  • Posts: 20
  • Medical camera designer since 1976
    • God, dogs and photography
Sizing for the web
« on: September 10, 2011, 11:57:34 am »

If you intend to use the web to display most of your work, or don't plan to print bigger than 4 x 6, then here is some advice on how to get the best results.

Let's start at the end. Most people will look at your work on iPads and laptops. What they will see depends on which browser they use, and how your picture instructs the browser to reproduce the colors you shot. With the wrong browser or the wrong embedded color profile in your image the picture could look "flat" or "washed out."
Some browsers have color management built in - like Safari and recent versions of Firefox, so that if you post an image with Adobe 1998 color space (some cameras record in this color space) the browser will convert the colors properly to the particular monitor being used. Other browsers may just assume that the image is in sRGB color space and this will produce a poor picture. Internet Explorer Version 9 is okay, but earlier versions are not.
Here is a site that shows whether your browser has color management built in.
http://ie.microsoft.com/testdrive/Graphics/ColorProfiles/

We don't know what browsers are being used, so it is best if you embed your color profile into the image, rather than just tag it with the color profile. And don't do both embedding and tagging.
The camera image data includes the color space tag. If you look at the image "info" in your picture browser or picture editing program you will see this color profile under "ICC profile." Or you can use EXIF Viewer a free MAC OSX 10.2+ app for camera JPEGS mostly. Most cameras use sRGB color space, but many have a proprietary color space simply called "camera color space." And a few cameras use Adobe 1998 color space as the default - many have the option to capture in Adobe 1998 color space.
So you will need to convert the image into sRGB color space before sending it on to the Web site. And then, unless you know that all your intended viewers use a color managed browser (if going to friends etc. or if the recipient is using a Mac) you should choose the option to save to web and embed the color profile rather than send it out  as an image that is only tagged with sRGB. All editing programs allow you to do this.
To convert from camera color space or adobe 1998, you use the image editor. Now it is important that you don't choose "Apply" or "Assign" sRGB color space but "convert" or "match to profile" (colorsync utility.) Some editors are a bit confusing when it comes to this and they don't make it clear what is happening to your image. What you want to see is no change to your image after you do this conversion. If the image goes flat, or the colors become saturated, then you have done the wrong thing.
For instance in Nikon Capture NX2 I first apply to the image the image color space that the camera assigns - sometimes the incoming image doesn't have a color profile shown in the editor because it was captured in Adobe 1998, or for other reasons, so I check the color profile of the original captured JPEG or TIFF (all the professional Nikon DSLRS can save a TIFF image). So, I assign this color space to the image in "adjust profile." Then I do my image editing and finally I convert the image to sRGB using adjust profile again. In the conversion options you should choose either "perceptual rendering" which pushes all the colors around to make space for those colors too big to show on the Web, that would otherwise get lopped off, or choose "relative colorimetric" which moves those colors into the SRGB color space without messing with the other colors. In the first place the relationship between colors is made more like the brain imagines them to be, in the second the important colors are kept more like the original objects (important if you are showing a well recognized object - like a coke can).

So, now at least the colors of your image will look right in a color managed web browser. To make your image appear right in any browser choose "save as" and select JPEG and then "embed profile" in the save dialog. The sRGB standard assumes a gamma of 2.2 (this affects the "contrast" of the displayed image) and  the original sRGB image capture gamma is 2.2. (For many years Macs used a display setting of 1.8 gamma.) - if you set your display monitor to a gamma of 2.2 (all PCs use this gamma by default), then you will be seeing what the web viewers will see (except for a few professional Mac users who still use a gamma of 1.8 - mostly graphic houses.)

This may seem like a lot of trouble to do but it quickly will become second nature.

Now for the big stuff - the things that corrupt your carefully captured images and make a mess of the colors that show on the Web.

1.
If the viewer has not color calibrated his monitor - all  the images are going to have a blue cast to them because most PC displays are adjusted to make pictures look bright and over saturated. The screen has to be adjusted so that gray looks gray. Macs have a built in display calibration utility. But this adjustment is not as good as using a colorimeter device that you hang over the display and run an application which will profile the display and  reset the display colors to be correct. Now, how many people will do this? Not many, I guess. So only your friends with colorimeters are going to see the same colors you do. For the rest all your pictures are going to look too blue, probably.  On the Mac, a quick adjustment to "Monitors" "calibrate" will allow you to reset the display to something closer to real color.

2.
Another thing that causes a loss in quality. You captured the image at 12 MP and have to squish it down to less than 2MP for screen display. Somewhere between the camera and the Editor 10MP of color data has to be eliminated. If you do this the right way the colors in your picture will be preserved, if the wrong way a lot of the color detail will be lost.

3.
You compressed the image so that it takes up less storage space, either on the SD card or for sending on the web.
here is the size for a high quality uncompressed image.
A 12MP 12 bit capture produces 12,000,000 x 12 x 3 (colors RGB) bits of raw data = 54 MB (actually more than this) which is reduced to 12,000,000 x 8 x 3 for the actual image that is reconstructed from this data which is 36MB of image data (you multiply the MP of the image by 3 to find the uncompressed image size.) This is the size of the TIFF file created on Nikon Professional DSLRS. A RAW capture is a conversion of the 54MB capture that is compressed to 18 MB in the camera. The use of RAW increases the speed of the camera compared with TIFF (more frames per second.)
If you have selected JPEG fine or whatever the highest quality JPEG is on your camera, the image will be "compressed" in the camera to something like 5MB - what the camera does is throw away almost 50MB of the original 12 MP data. The designers assume that you won't be able to see what they have taken away, anyway because you are looking at the images on a crappy display. And you don't have anything to compare the image with - the original scene you shot is a distant memory, and humans don't remember colors very well.
If you had a camera that converted the data to both TIFF (36MB) and JPEG (5MB) at the same time you could compare images side by side - which is what I do, on a high quality calibrated monitor. Then you would see the deterioration in image quality caused by throwing away all that color data when saving as JPEGs.

So, what can you do?
You could shoot TIFFS or RAW converted to TIFFS, but you then end up with a 36MB or 18MB file which you can't post on the web. You are going to let your editing app, throw away the image data to bring the file down to 2MP for display. Some editors give you control over this, some don't.
A good editor will let you compress the image using a number of different algorithms. Adobe prefers you use the algorithm bi-cubic and its variations. But this isn't the best for all images. It depends on how big a change you are making to the size of the image, and what type of image it is - buildings, trees, people etc.

One of the problems with resizing from 12MP to 2MP is that the JPEG compression algorithm requires that high resolution detail that is visible in the original image must be removed because it will be smaller than the display can resolve. For example a leaf of a tree may be only 4 pixels wide in the original and this would be reduced to 1 pixel or so which can't be recognized as a leaf by the eye. But the reduction algorithm may create an "imaginary" leaf from the colors surrounding the leaf, and what you get is a white blob where there should have been a green leaf. One way to deal with this is to pre-filter the original image before reducing it in size, to reduce the high frequency components of the image (the very fine detail.) You can do this by blurring the original image with a gaussian blur, reducing the image, and then re-sharpening the reduced image using your editor.

The second thing you could do is shoot 2 MP images to begin with and let the camera decide what to throw away of the captured data. This is often the best option for those camera designs that combine photodiode data from a number of sites to make the pixels (most Fuji cameras do this, so do many Panasonic cameras and Leicas - and probably other cameras do if only the manufacturer would be willing to divulge the methods they use to reduce noise.) So when you shoot a 3MP image on a 12MP camera, the signal from 4 photosites are combined which reduces image noise causes by photon flux, and increases the dynamic range (i.e more color).

All this is from my own photographic testing shooting more than 20,000 pictures on some 14 digital cameras.

This 2MP image will be 6MB in TIFF format, or in JPEG fine probably less than 1.5MB.
You can't shoot a RAW 2MP image, so RAW brings none of these benefits -  all RAW images show a lot of photon flux noise and only the PP can take care of this.

The 2MP can be displayed "as is" on many monitors. If they are too big for a site - like for Leicaimages.com or Rangefinderimages.com, the images can be reduced exactly 50% and with a small amount of cropping be made to the 1500 pixel max width allowed. The algorithm for a 50% reduction doesn't corrupt the image, as it would for a 60% reduction or a 23% reduction, for instance.

A 6MB TIFF file can be sent via e-mail or into the cloud. But of course unless you are using Nikon professional DSLRS (D300, D3 etc), Canon older SLRS, and some canon compacts or Olympus Evolt, or early Leicas and Panasonic cameras, you won't be able to capture the image data as TIFF. But this is how I send images to friends when we are comparing camera performance or working on pictures together.

So, if you are limited to JPEG captures what can you do to preserve the original image data.
1. Shoot at low res - 2MP or 3MP and let the camera do the best it can with the data,
2. Capture the JPEG at the lowest compression ratio (highest quality).
3. Convert the file to TIFF before making any modifications even image rotation.
4. Do all you edits in TIFF format.
5. save as JPEG with embedded color space for the web with 100% quality level.

Cheers
Logged
Digital technology is fun.
Pages: [1]   Go Up