Talk:Blend modes

Latest comment: 1 year ago by Jacobolus in topic Pixel definition

Arithmetic confusion

edit

The Color Dodge blend mode divides the bottom layer by the inverted top layer... Blending with white gives white. Blending with black does not change the image.

I'm admittedly trying to figure this stuff out of the first time, but the math here doesn't seem to add up in my brain. The way this is described as working is what I see happening in Photoshop, but the division doesn't match. Unless I am confused about how the color values are referenced. If the red channel of bottom layer is 100, and my top layer is black (0), the resulting value for that channel should be 100. If I do the math as presented here, though, I get (100 / (255 - 0)) = 100 / 255 != 100. I'm guessing I'm doing something very basic wrong. Could anyone point me in the right direction? Or perhaps this explanation is incorrect? Farski (talk) 14:02, 19 February 2012 (UTC)Reply


"This article may require cleanup to meet Wikipedia's quality standards."

That is pretty vague. IMO, you shouldn't add such a tag without being more specific, unless it's obvious to most people what needs to be changed/improved. To me it's not obvious. And I'm not the author of this article. Cmlewan (talk) 00:20, 7 March 2008 (UTC)Reply

Curves?

edit

Article mentions a couple of times that "curves are easier to use", or somesuch comment. This doesn't seem relevant; transfer modes are not designed for the same purpose as curves. If someone's using transfer modes to colour correct an image by compositing it with a different image, he's behaving very strangely.

Perhaps this should be removed. —Preceding unsigned comment added by 91.85.163.113 (talk) 00:12, 12 November 2010 (UTC)Reply

I’m not sure who wrote that prose, but you’re right that it’s quite unclear. I believe the idea is that some recommend compositing an image with itself in multiply or screen mode as a step in a color-correction process. Such a step can be replaced with a curve, which makes the precise behavior of the step much clearer, more explicit, and more adjustable. –jacobolus (t) 10:40, 12 November 2010 (UTC)Reply


Comparing blend modes to the use of curves is indeed ridiculous. They have nothing to do with each other. Those comparison should definitely be removed, they are only confusing. Or at the very least, it should be made explicit "blending with WHAT" is being compared to using a curve. In one case curves are mentioned just after mentioning the idea of blending an image with a uniform solid color, so it can be inferred (but is not stated quite clearly) that using a curve is being compared to such a blend. But in another case it is not even vaguely specified what is the image that, blended with a given source image, would produce a result that is being compared with what can be obtained using curves. Maybe it's blending an image with itself, or blending it with a uniform color. Neither of which is an obvious, common, reasonable or recommended use of blending. Matteosistisette (talk) 17:03, 4 March 2011 (UTC)Reply

subtract ambiguity

edit

This blend mode simply subtracts pixel values of one layer with the other

Which one is subtracted from which one? Front minus background or viceversa? It does matter. Matteosistisette (talk) 14:02, 31 December 2009 (UTC)Reply

Sample Pictures

edit

I see there is some activity to improve this article. May I suggest that someone tries to improve the sample pictures as well? I spent quite a lot of time creating the current ones at the time, but I never was that happy with the result. If someone can come up with better, clearer or at least more appealing ones, I think that would be welcome. There is definitely room for improvement. --Mlewan (talk) 17:59, 10 October 2010 (UTC)Reply

Yes, I agree that would be very helpful. There’s some need for explanatory text near the top too. I’m somewhat worried whether the technical details of photoshop’s blend mode will be “verifiable” by wikipedia standards – they’re easy to verify empirically (i.e. by just trying them on a couple of photoshop layers), but I don’t know of any published books that describe them with accurate technical detail, and some guy’s website doesn’t meet the criteria of WP:RS.
If you want to try to make some better images, I’d be happy to offer advice about useful content. Otherwise I might get around to it someday. Might be a while though. –jacobolus (t) 00:36, 11 October 2010 (UTC)Reply
The article was created when the zeal for perfect references was less ardent than today. However, I think one can find descriptions of what is going on in Adobe's and the gimp's user manuals - some of which are printed with ISBN numbers and available in bookshops. Perhaps "Adobe Photoshop CS5 Classroom in a Book" or "Photoshop CS5: The Missing Manual" for example. Manuals for other products probably also work. I do not find any personal interest in refining the references, but it should be possible, if someone sees the need. Mlewan (talk) 14:51, 11 October 2010 (UTC)Reply
There are loose descriptions in published books, but they’re all pretty hand-wavey. The best source is <http://dunnbypaul.net/blends/> but that’s of course just someone’s personal page. –jacobolus (t) 20:39, 11 October 2010 (UTC)Reply

We have something better than somebody's personal web page now - a recently published W3C working draft derived from open PDF specifications and earlier related drafts. Hopefully that lineage is verifiable enough :) Perhaps it's time for the page to be revised in line with it, to the extent it can be given the variety of apps out there.

I recently made some sample images using a public-domain source recently for something I'm working on elsewhere. Would those be suitable for inclusion here? The gradient background is one of GIMP's builtins ("Tropical", IIRC), and the top layer is from a public domain source. The image and backdrop was chosen for its colour, in order to resemble the W3 reference's non-free sample image because that seemed helpful during implementation, but please let me know if you can think of anything more suitable!

Small, illustrative thumbnails using the same source and backdrop layers and showing the results of each operation, in a common place next to each blend mode's description would be useful, and help to draw the user's eye down the page to make comparisons. Some modes might need didactic renderings as well, e.g. Overlay for which one or two bitmasks could be shown demonstrating which part of the image is dark enough to receive the scaled multiply, and which part is light enough to receive the scaled screen.

--A. T. Chadwick (talk) 13:56, 12 November 2012 (UTC)Reply

Alpha channel

edit

Wouldn't it be worth mentioning the role of the alpha channel (or opacity) in blending? — Preceding unsigned comment added by Matteosistisette (talkcontribs) 17:09, 4 March 2011 (UTC) Yes I think it should mention it. — Preceding unsigned comment added by 190.60.93.218 (talk) 15:59, 24 February 2012 (UTC)Reply

Are there any blend modes in software out there which have a non-separable blend mode which explicitly depends on source or destination alpha? The recent W3C Compositing and Blending draft basically says that alpha doesn't matter until the pixel colour which the blend generates is composited onto the backdrop. For the compositing stage, it allows any Porter-Duff compositing operator to be used and those can depend on the alpha channels - but none of the blending functions mention it. --A. T. Chadwick (talk) 13:22, 12 November 2012 (UTC)Reply
Pretty sure that spec is explicitly based on the way Photoshop deals with it. I don’t know if other software takes some different approach. –jacobolus (t) 03:15, 13 November 2012 (UTC)Reply
It also draws heavily from the PDF specifications. Certainly something Adobe-based. Anyway, I've mentioned the role alpha plays in the revision to the Normal blend mode just now, without going into crazy depth. Hopefully readers will be able to generalize from that plus a few links to the compositing stuff. --A. T. Chadwick (talk) 16:42, 13 November 2012 (UTC)Reply

"Discontinuity" of soft-light

edit

I'm not a serious mathematician, but I'm fairly certain we can't state that the Photoshop formula

 

is discontinuous. Consider the plane b=0.5, at which the first case would become  . The second case is equal to it for all a, at  . Since each half of f(a, b) is continuous, and the limit of both halves as b approaches 0.5 is a, the function as a whole is continuous for range of defined values.

Not sure it's differentiable, but it looks continuous.

--A. T. Chadwick (talk) 00:41, 13 November 2012 (UTC)Reply

You are right A.T., there's no discontinuity, especially not the one claimed by the first diagram in "Comparison of soft light blend modes" (https://en.wikipedia.org/wiki/Blend_modes#/media/File:Comparison_of_soft_light_blend_modes.png). That diagram is simply wrong, there's no such disconuity separating its upper from the lower half.

Only the derivations of the curves would have a slight discontinuity in their horizontal middle, which would show as very slight kinks.

I confirmed this for myself visually by re-creating an equivalent (but proper) Diagram in Excel.

Regards,

Wikithoughts (talk) 10:34, 11 April 2016 (UTC)Reply

+1 about the diagram being wrong, but the text is right. It claims that the discontinuity is in local contrast. If contrast is understood as the derivative of luminosity, the discontinuity in the derivative is apparent in the diagram shown in the source. --pgimeno (talk) 16:36, 27 October 2019 (UTC)Reply

Gamma

edit

The article should mention that gamma encoding or its absence will have an effect on the appearance of the blended result. From what I've been able to gather recently,

  • The PDF specifications say to use linear encodings both for blending and the subsequent compositing.
  • That recent W3C spec says nothing, but its author has stated that (for Canvas and SVG at least), blending is to be performed in device space.
  • That Photoshop has a "rarely used" mode for setting the gamma used for blending.

Anyone with deeper insight into these apps and technologies able to clarify the article more? --A. T. Chadwick (talk) 01:08, 13 November 2012 (UTC)Reply

Editorializing

edit

Call me crazy, but the following verbiage does not strike me as terribly encyclopedic. I am moving it here for discussion and refinement.

(Note, this formula is not the official one from Adobe but rather was reverse engineered by http://www.pegtop.net/delphi/articles/blendmodes/softlight.htm. Adobe's equations are not officially documented anywhere, as they are proprietary and are probably legally considered "trade secrets". In fact, the reverse engineered equation for Soft Light is incorrect! I have just tested it and checked and rechecked it in my own software using this reverse engineered algorithm, and it is consistently giving visibly different results than the official Adobe implementation. In case the version of Photoshop makes a difference, the version I have that I used to do the comparison was Photoshop Elements 9.)

Nonstopdrivel (talk) 08:28, 7 April 2013 (UTC)Reply

Seems reasonable. Especially since Adobe is trying to get their definitions of these into CSS. –jacobolus (t) 10:55, 7 April 2013 (UTC)Reply
See https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.htmljacobolus (t) 10:57, 7 April 2013 (UTC)Reply

“All the math behind photoshop compositing”

edit

In the references section, there is a link labelled “All the math behind photoshop compositing”, but its URL is unrelated to Photoshop and is that of a W3C document, http://www.w3.org/TR/SVGCompositing/ . Is this malicious or an error? --Hibou57 (talk) 11:58, 9 April 2013 (UTC)Reply

Etymology

edit

Where does the term "screen" come from? — Preceding unsigned comment added by 23.118.190.205 (talk) 06:08, 31 December 2014 (UTC)Reply

edit

Hello fellow Wikipedians,

I have just modified one external link on Blend modes. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:

When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at {{Sourcecheck}}).

This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}} (last update: 5 June 2024).

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers.—InternetArchiveBot (Report bug) 04:12, 4 November 2016 (UTC)Reply

"Basic" blend modes

edit

The term "basic blend modes" is used twice in this article. Can we agree upon the fact, that the word "basic" doesn´t make sense here (and only bloats), because "basic" has never been defined in this context ? If so, I´ll remove "basic". Lensitivity (talk) 21:21, 1 May 2020 (UTC)Reply

Symmetric/commutative

edit

Multiply is described as commutative, screen is described as symmetric, but these appear to mean exactly the same thing. Spent a while trying to think if there is some subtle difference, but I can't see any. Shouldn't the same term be used for both

Luminosity

edit

Luminosity Tushar Dharpale (talk) 13:02, 17 September 2021 (UTC)Reply

Hi please give me luminosity Vivek Khedakar (talk) 04:33, 4 October 2022 (UTC)Reply

Pixel definition

edit

The intro contains this phrase: "...because each pixel has numerical values". This seems pretty vague.

I'm no color expert, but I think the color value of a pixel is defined by 3 primary color intensities ("channels") r, g, and b, each with a value [0..255]. A fourth number alpha in the range [0, 1] can be used in combining two pixels.

With those terms defined we can define the "color multiplication" of two pixels as the product of each channel pair, normalized by dividing by 255: r1*r2/255 etc.

The sentence might become "...each RGB pixel is defined by three color channel values and one opacity value."

Finally, there are probably systems for, say, tetrachromats like birds that might be briefly acknowledged. Captain Puget (talk) 22:19, 25 August 2023 (UTC)Reply

There are CMYK blend modes, but to my knowledge nobody has implemented an image editor for tetrachromat birds. –jacobolus (t) 23:01, 25 August 2023 (UTC)Reply