View Single Post
  #3  
Old March 22nd 18, 02:16 AM posted to rec.photo.digital
Mayayana
external usenet poster
 
Posts: 1,514
Default I'm looking for a book on Photoshop - 'Inside Photoshop".

"Eric Stevens" wrote

| What I would
| like to know is what goes in inside Photoshop when I (for example)
| create a clipping mask. This doesn't mean that I want to know the
| actual code but I would like to know what the code is doing.
|
| Is there such a book? Does anyone know?

I'm not sure I understand what you're asking,
but it sounds like what you want to know about is
graphics programming. You might be able to find
books, but unless you're writing code there's not
much call for such a thing. In other words, some
people want to know how to select an area. Some
people want to know how to write software that
allows for selecting an area. But few people want
to know how to do that without having any plan
to do it.

In brief, if you're dealing with raster images it's
all about the bitmap. The image, once loaded, is
what's known as a device-independent bitmap. A DIB.
Which is an array of byte values that represent a
grid of pixel color values.
The original image is one DIB. The mask is another
DIB. From there it's just math, differentiating the
pixels in the first DIB that coincide with the mask
from the pixels that are outside the mask. So for
instance if you mask a circular area and then want
to copy that to a white background, the copying
routine will calculate which pixels are within the
circle and copy only those.

It's all math. For example, resizing works by comparing
pixels in the vicinity of a given pixel in order to guess the
best color value for new filler pixels. There are various
methods for doing that. Bilinear resampling
will compare the 4 nearest pixels to choose a color
for added pixels when enlarging. Bicubic will compare the
16 nearest pixels, taking more time but resulting in a
better quality image.
Sharpening works by finding differences and increasing
them.... Lightening works by increasing the RGB pixel
values....

These days it gets almost magical, with the ability
to do things like remove an object from an image and
auto-fill that background convincingly. But it's all
still just math working with pixel grids.

By comparison with things like "intelligent" fill or
high quality resampling, a mask is grunt work.