View Single Post
  #4  
Old March 22nd 18, 02:39 AM posted to rec.photo.digital
nospam
external usenet poster
 
Posts: 24,165
Default I'm looking for a book on Photoshop - 'Inside Photoshop".

In article , Mayayana
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,


then you shouldn't answer.



The original image is one DIB.


except when it's written for something other than windows.

The mask is another
DIB.


except when it's a path, especially one that overlaps.

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 a *lot* more complicated than that.

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....


that's *very* simplified and not entirely correct. for example,
lightening doesn't work in rgb space and is a lot more advanced than
simply 'increasing the values' so as to not blow out highlights.

photoshop's healing brush uses partial differential equations.

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.


it's more than just math. there's now a lot of machine learning
involved.