A Logical Approach to Quality Digital Images
1. A Typical CCD image vs. A Photo Quality Image
2. CCD vs. Film
3. Non-linear Film Photography Processes
4. Summary
A Typical CCD image vs. A Photo Quality Image
A lot of people have suceeded before to attain the 'photo-quality CCD images', but, in most cases, the process has seemed to be a 'Trial and Error' aproach. In order to generalize the process, we have to know:
CCD vs. Film
Good linearity of CCD sensor is important for accurate measurement of magnitude. For most amateurs, however, their goal is "beautiful pictures", not "measuring magnitudes". If this is so, the next question is:
The answer is: Usually not very important.
Non-linear Film Photography Processes
Two non-linear processes in film photography play an important role in making photographs look natural to the eye:
Gamma Curve Non-linearity
CCD data has an extremely large dynamic range. The range is too large to be reproduced on print or in a video display. In the highlight region of an image, photographic film saturates gradually while a CCD image saturates suddenly, at a maximum point. The low level, the contrast of film is low at nature. This comes from the S-shape Gamma curve. The S-shape gamma curve is shown in fig-1 with the curve of CCD sensor. This difference in saturation behavior of the films expands the effective dynamic range of film, compared to CCD images.

Keeping this behavior in mind, we consider the "gamma value," which is the gradient of the linear region on the gamma curve. A larger gamma results in a higher contrast image. When we require the same gamma value for the major part of image, the effective dynamic range of the processed (and printed) CCD image will be "much narrower" than film.
The down side of this non-linear expansion of the effective dynamic range is low contrast in highlight region, which results in a "flat" appearance. In the chemical process of films, an edge emphasis is usually used to compensate for this defect.
EXAMPLE: CCD image of M77
The core of M77 is very bright.

Image a was taken using the convensional process.
Image b was taken S-shaped Gamma Curve.
Image c was taken using S-shaped Gama Curve plus edge emphasis (discussed below).
Edge emphasis Effect
Although the edge emphasis is very important to achieve the Photo-Quality, most film users may be not aware of this fact, because it is always done automatically in the chemical process. You can clearly see this effect in pictures of the moon, at the boundary (fig-2), which was taken by Fuji Color.

Summary
It is a non-linear gamma curve plus edge emphasis effects in the highlight region that result in images with a wide dynamic range. This is automatically done in the chemical process of film.