Matthew Caulfield asked [210415 MMDigest] "How do desktop printers
convert color images to printed images using ink cartridges?"
While I know it isn't magic, I must admit that the ease with which
I can take and change an image to be whatever size, color, or whatever
else I want is somewhat magical! I was taught, not that long ago, to
enlarge images by hand using different sized grids and doing each tiny
section of an image one by one. Now, I can do as many sizes as I want
in less than 10 minutes.
While I know some of how the digital 'magic' works, my husband is much
more fluent in all things computer than I am. In addition, he's spent
a lot of the last 20 years or so dealing with the digital images that
make up movies, both regular and animated. So, I asked him to answer
Matthew's question, and since Robbie thought it might be useful to
others as well, please see below.
Monica Jones
Simi Valley, California
[ Several years ago Monica and Rob asked MMDers about replicating the
[ colorful decal on their Nelson-Wiggen 4X nickelodeon, which led to
[ a lively discussion about color matching. See the articles gathered
[ at https://www.mmdigest.com/Gallery/Pictures/mjones_N-W_decal.html
[ -- Robbie
- - -
Digital Imaging, Storage and Printing, by Rob Jones
Part One: Digital Imaging
The process of taking digital pictures isn't significantly different
from how it's been done for decades. A lens (or series of lenses) focus
the light bouncing off the photographic subject onto a light sensitive
surface in the camera that records the intensity and oftentimes the
color of that light.
The only thing that has changed is the nature of that light-reactive
material. Once it was layers of photosensitive chemicals on an acetate
or plastic strip. That's been replaced with an array of tiny light
sensors arranged in a grid on a microchip. Two common types are the
charged-coupled device (CCD) or complementary metal-oxide semiconductor
(CMOS) sensors.
Wikipedia describes both with their usual attention to detail should you
want to learn more. For our discussion, we'll grant that they work as
advertised, and that I'm going to gloss over some of the detail in order
to give you an accurate, if simplified, description of the image capture
process.
The surface of the chip is covered with a grid of sensors grouped into
sets of three, one each attuned to red, green, and blue light. The light
intensity is recorded as a value along a fixed range. Depending on the
age and quality of your camera, you may have as few as 8 values for each
color range or as many as 65 thousand (or more). Many consumer grade
cameras use 256 values per color.
This arbitrary conversion of light intensity to a fixed set of numbers
can result in an effect called 'color banding'. If you look at a picture
of something that has a smooth color gradient in the real world (like
a nice sunset, for example) and can see what appear to be strips of
color with a sharp separation edge with a similar color, you're seeing
the result of the camera having to separate a smooth color change into
steps. Our eyes are really good at finding these edges, so a lot of work
has gone into improving both hardware and software to make them less
obvious.
When you press the shutter button on your camera, the computer in the
camera quickly scans the array of sensors and captures the red, green,
and blue values for each sensor triplet, which we'll call the RGB value
from here on.
One limit to the resolution of cameras is how quickly the array can be
scanned, since scanning too slowly would allow the subject to move
between the first and last RGB triplet scanned, producing a distorted
image. While better digital cameras still have a shutter, most low end
cameras allow light to hit the sensor at all times, producing the
viewfinder image on the screen on the back of many cameras and produce
the shutter 'click' sound using a recorded audio file played through
a tiny loudspeaker.
Part Two: The Image Format
Now that the camera has captured the raw scan of the sensor data, it has
to be stored to memory in a usable format. The three values from each
sensor set are joined into a data value called a Picture Element or pixel.
If the camera has a fast processor and a fast (and large) memory storage
device, these values are written directly to the storage with no further
processing. This is called a raw image format, and usually has the file
suffix RAW (creative, I know!).
The camera will often add other information about the image, called
metadata, which can include things like the time and date, f-stop, the
speed of the sensor scan, and even the location of the image if the
camera has a GPS sensor. The RAW format is the truest possible
representation of the image, and gives you the most data to work with
later.
The trade off is that the file can be very large, and limit the ability
of the camera to take pictures quickly since it has to move the image
data from its memory onto the storage medium before it can scan the
sensor again.
Most cameras address this issue by converting the image while it is
still in the camera's memory into a more compact format and then writing
the smaller data set to the storage device. There are a huge number of
formats that can be used, but the most popular one right now is JPG.
JPG is short for 'JPEG' (computers used to only allow three character
file extensions), which is short for the 'Joint Photographic Experts
Group', which is the organization that developed and published the
format specification in 1992 (again, see Wikipedia).
When the raw pixel data is processed using the JPEG algorithm, a certain
amount of the image data is sacrificed in order to reduce the amount of
data needed to represent the image. This is done by discarding variations
in the color values from pixel to pixel that (hopefully) will not be
noticeable to the human eye. This size/quality trade-off can be tuned,
and many cameras have some way to select the final image quality in order
to fit more pictures on a storage device.
Now, the image is ready to write to the storage device.
Part 3: Storage Media
I'll cover this quickly, since media and file system formats are complex,
dull, and not terribly relevant to our discussion. Cameras have evolved
through a large number of storage options since abandoning chemical film.
Early cameras had 3.5" floppy drives built into them, which would whirr
and click in a fairly distressing manner while saving photos. They were
also very slow, often taking several seconds to save the image before
the camera was ready to take another picture.
As non-volatile memory (essentially computer memory that doesn't lose
the stored information when power is removed) became more dense and
cheaper, a series of different memory card formats were introduced,
upgraded, and discarded through the years. Most cameras today use either
SD card or Micro SD card media, which is what most current smartphones
use. Other cameras can connect with nearby computers using wireless
networking protocols to deliver image data straight to where it will
be used.
While Windows PCs and Mac computers use very different file system
formats on their internal disks, they have largely settled on one or
two common formats for removable media, so you shouldn't have an issue
pulling the card from your camera and loading it into your favorite
computer to edit and print photographs.
Part 4: Printing
Printing an image is pretty much the reverse of capturing it. Each pixel
is mapped into a grid that represents your image on paper and scaled
so that each pixel is equally represented across the width and height
of the photo that you want to print.
There is usually some minor processing to blend together adjacent
regions of color to soften the transition from one to the next (a process
called dithering), which can be managed by the print settings in your
printing software. Some printers have the print software embedded into
the printer itself, and you can plug a memory card directly into the
printer and select images to print. In other cases, the printer driver
in your computer will do the honors.
No matter which device does the conversion, the final format of the
data is a series of instructions that activate the print head for each
color to deposit a controlled amount of ink as it passes back and forth
across the paper at a known speed. The different color ink hits the
paper, spreads out slightly and blends with the other colors to produce
a (hopefully) pleasing image. (Laser printers work differently, but the
high level concepts are the same.)
Rob Jones
Simi Valley, California
|