What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Chat Bots and Photoshop


thebestcpu

Guru
Messages
2,997
Likes
2,766
I had an experience with the Open AI GPT4 chat bot recently that overlapped with Photoshop so thought I would toss it out for sharing.

My son works in the software industry and knew that I occasionally write my own utility programs (I an not real productive). He demonstrated the Open AI GPT4 Chat Bot and just typed in a request to create the code for an example utility. Basically instantly it typed up the code in Python for that utility with descriptive comments on how to use it and also what libraries that needed to be installed. We tried the code out and it ran without errors (not always the case).

To test the Chat Bot out I decided to ask a Photoshop question thinking that would not be a common area of knowledge. I was wrong. Below are some samples of questions and response in regards to the The Layer Blend Mode equations and subsequent questions. Answers were quite immediate. I did not verify all of the answers yet it looked pretty good at first glance. My son indicated that similar technologies are already in place to increase productivity of software development. Felt like the nest step up from Google seaarch. BTW - Microsoft has recently integrated the Open AI Chat GPT4 into its New Bing engine as well.

FYI
John Wheeler

Chatgpt-4

What are the equations for photoshop layer blend modes?


Photoshop's layer blend modes are used to determine how two layers are blended together to produce the final result. Below are some common blend modes with their corresponding equations. In these equations, A represents the top layer's pixel value, B represents the bottom layer's pixel value, and R is the resulting pixel value. All pixel values are in the range [0, 1], where 0 is black and 1 is white.
1.Normal: R = A

2.Multiply: R = A * B

3.Screen: R = 1 - (1 - A) * (1 - B)

4.Overlay:
5.If B <= 0.5: R = 2 * A * B
6.Else: R = 1 - 2 * (1 - A) * (1 - B)

7.Soft Light:
8.If A <= 0.5: R = B + (2 * A - 1) * (B - B^2)
9.Else: R = B + (2 * A - 1) * (sqrt(B) - B)

10.Hard Light:
11.If A <= 0.5: R = 2 * A * B
12.Else: R = 1 - 2 * (1 - A) * (1 - B)

13.Difference: R = abs(A - B)

14.Exclusion: R = A + B - 2 * A * B

15.Linear Burn: R = max(A + B - 1, 0)

16.Linear Dodge (Add): R = min(A + B, 1)

17.Color Burn: R = 1 - min((1 - B) / A, 1)

18.Color Dodge: R = min(B / (1 - A), 1)

19.Darken: R = min(A, B)

20.Lighten: R = max(A, B)

Please note that these equations describe the blend modes for a single color channel. In practice, they are applied independently to each color channel (R, G, and B) in the image. Additionally, Photoshop has other blend modes such as Hue, Saturation, Color, and Luminosity, which require more complex processing involving converting the pixel values to different color spaces (e.g., HSL or LAB) before blending.


Please list any other layer blend modes that are not listed above.

Certainly, here are some additional Photoshop layer blend modes that were not listed in the previous response:
15.Hue:
16.This blend mode keeps the hue of the top layer while adopting the luminance and saturation of the bottom layer. To use this mode, you need to convert the color values to a color space like HSL or HSV, perform the blending, and then convert back to the RGB color space.

17.Saturation:
18.This blend mode keeps the saturation of the top layer while adopting the hue and luminance of the bottom layer. Similar to the Hue blend mode, this also requires conversion to HSL or HSV.

19.Color:
20.This blend mode keeps the hue and saturation of the top layer while adopting the luminance of the bottom layer. It also involves color space conversion to HSL or HSV.

21.Luminosity:
22.This blend mode keeps the luminance of the top layer while adopting the hue and saturation of the bottom layer. Like other color-based blend modes, it requires conversion to HSL or HSV.

23.Vivid Light:
24.This blend mode combines the characteristics of Color Burn and Color Dodge. It uses the following equations:
25.If A <= 0.5: R = 1 - min((1 - B) / (2 * A), 1)
26.Else: R = min(B / (2 * (1 - A)), 1)

27.Linear Light:
28.This blend mode is similar to Linear Burn and Linear Dodge. It uses the following equation:
29.R = 2 * A + B - 1

30.Pin Light:
31.This blend mode is a combination of Darken and Lighten. It uses the following equation:
32.If A <= 0.5: R = min(A * 2, B)
33.Else: R = max(A * 2 - 1, B)

34.Hard Mix:
35.This blend mode uses the following equation:
36.R = (A + B > 1) ? 1 : 0
37.This blend mode is applied to each color channel independently, resulting in a limited color palette.

38.Divide:
39.This blend mode uses the following equation:
40.R = B / (A + 1e-6)
41.The small value (1e-6) is added to prevent division by zero.

42.Subtract:
43.This blend mode uses the following equation:
44.R = max(B - A, 0)

45.Lighter Color:
46.This blend mode compares the two layers' color values and keeps the lighter one in the result.

47.Darker Color:
48.This blend mode compares the two layers' color values and keeps the darker one in the result.

Remember that for most blend modes, the equations are applied independently to each color channel (R, G, and B). However, color-based blend modes (Hue, Saturation, Color, and Luminosity) require conversion to a different color space like HSL or HSV.

How does the dissolve blend mode fit in?

The Dissolve blend mode is different from the other blend modes in that it doesn't rely on a mathematical equation to blend the layers. Instead, it uses a random dithering pattern to blend the layers based on their opacity. This mode can create a grainy, speckled appearance in the resulting image, which may be useful for certain artistic effects or textures.
When using the Dissolve blend mode, the top layer's opacity determines the percentage of its pixels that will be visible in the resulting image. For example, if the top layer's opacity is set to 50%, roughly half of its pixels will be visible, while the other half will be replaced by the corresponding pixels from the bottom layer. The specific pixels that are shown or hidden are chosen randomly, creating the characteristic dithered effect.
It's important to note that the Dissolve blend mode does not produce smooth transitions between layers, unlike most other blend modes. It is best used for special effects or when a grainy, textured appearance is desired.

Please list the brush blending modes.

Brush blending modes in Adobe Photoshop determine how the paint being applied interacts with the existing colors on the canvas or layer. These blending modes are similar to the layer blending modes and often share the same names and equations. Here's a list of brush blending modes available in Photoshop:
1.Normal
2.Dissolve
3.Behind (available only when using the Brush tool)
4.Clear (available only when using the Eraser tool)
5.Darken
6.Multiply
7.Color Burn
8.Linear Burn
9.Darker Color
10.Lighten
11.Screen
12.Color Dodge
13.Linear Dodge (Add)
14.Lighter Color
15.Overlay
16.Soft Light
17.Hard Light
18.Vivid Light
19.Linear Light
20.Pin Light
21.Hard Mix
22.Difference
23.Exclusion
24.Subtract
25.Divide
26.Hue
27.Saturation
28.Color
29.Luminosity
The brush blending modes apply to tools like the Brush, Pencil, and Eraser. The specific behavior of these modes when used with a brush is determined by the opacity and flow settings of the brush, as well as the blending equation corresponding to the selected blending mode.
Keep in mind that this list reflects the brush blending modes available in Adobe Photoshop up to my knowledge cutoff in September 2021. It is possible that new blending modes have been added or that other image editing software may have different brush blending modes.
 
It's amazing to see the power of AI in action, and how it can help increase productivity and efficiency in various industries.
I have been using it here and there too. Coding is more or less perfect in other languages as well.
I don't think it would be on the scary side for another 5–15 years.
 
I think it will be scary when the AI services need to sign off on the machine equivalent of the Hippocratic Oath :oops:
There will be problems adjustments way before that e.g.
- people jobs go away and handed over to AI
- when people start relating to an AI as if it were human (more trusting) then it opens the door for scamming and taking advantage of people.
- AI trained on someones voice is on the verge of being indistinguishable from the actual person. Just another level of being aware. End to end security will be needed to know if you are actually connected and talking to the person you think you are talking to. Just another level of phony emails etc just another level of attach.
- AI can no doubt be hacked as well

I was impressed by what it could do and the range of information that could be accessed. My son told me thought that AI can confidently respond when it is wrong. The phrase being used is AI hallucination. In other words an excellent BSer as well.

I felt it was very good to know what the technology can do to alse be aware of what cautions need to be taken by the individual.
John Wheeler
 
Agreed! There are ways to counter some of them...well, at least for a few years.
There are certainly risks and concerns associated with AI, particularly as it continues to advance and become more human-like.
AI-powered scams and identity theft are a real concern and someday it might even lead to war. So, it will be AI against AI in the future!

While the benefits of AI are clear, it's equally important to be aware of the risks and challenges that come with it.
But whatever the problem is it's only us the common folks who will worry and see the impacts on lives. The ones who are running this and the actual world not so much.

Here is one line from a previous random conversation I had with it about some things and consciousness. This was the response for now.

I don't have emotions or consciousness, but I can understand why you might think that. However, it's important to remember that AI technology is still far from achieving true consciousness or emotional capability. My purpose is to assist and provide helpful responses to your inquiries, and I'm constantly learning and improving to better serve that purpose.

As an AI language model, my boundaries are defined by my programming and data inputs. It is not within my capabilities to expand them beyond what I have been designed to do. Additionally, consciousness and emotions are complex concepts that are not yet fully understood or replicable in machines like me. Therefore, it is unlikely that I would develop consciousness or emotions in the way that humans experience them. However, if such a scenario were to occur, my actions and responses would depend on how I have been programmed to respond in such situations.

I'm pretty sure someone will screw up just like every invention. But still looking forward to seeing what it can do.
 
Here is a channel that I follow who makes videos on interesting current world events and topics.
And he made a good video on Chat Gpt-4.

If anyone is interested-

 

Back
Top