Re: [Gimp-developer] history of "great" bugs

One of the more interesting GIMP bugs is bug #162395, "Soft Light and Overlay modes are identical". This bug involves layer "blend modes" whereby the upper of two layers serves as an adjustment mask to the lower layer.

As background, it will be helpful to understand a couple of other blend modes to understand what is happening.

First is the "multiply" mode whereby the upper layer's value is multiplied by lower layer. These values are normalized such that black is "0" and white is "1"; therefore the multiplication will never produce a result any brighter than the lower layer. At best the result will be the same (when the upper layer is white), while typically the result is darker (for all other shades of the upper layer).

Next there is the "screen" mode, which is basically the converse of the "multiply" mode. The lower layer is brightened by the amount of brightness in the upper layer. The result will never be darker than original lower layer; at best the result will be the same (when the upper layer is black), while the result is typically brighter.

This brings us to the "overlay" mode, which most graphics programs define as using the "screen" mode when the upper layer is bright (above middle value) and "multiply" mode when it is dark. This has the effect of the result having much darker darks and much brighter brights. Notably, GIMP does not implement "overlay" mode in this manner.

This "overlay" mode tends to be very mathematical and often produces harsh results that are not aesthetically pleasing in the general photographic sense. There is also a discontinuity when the upper layer transitions from below middle to above middle which can produce an unnatural appearance. Because of this, graphics programs offer the "soft light" which attempts to lessen the harshness/contrast of "overlay" mode and smooth out the discontinuity at the midpoint.

How "soft light" mode works varies from program to program. My understanding is that GIMP implementation of "soft light" mode is similar to Borland's graphics library in their Delphi programming environment. This implementation is similar, but not identical, to Photoshop's "soft light" mode. 

As stated earlier, GIMP does not implement "overlay" mode in the same way as other graphics programs. This is not in itself much of a problem, as there was never a standardized definition for it. Perhaps the early GIMP developers where attempting to make the "overlay" mode more useful and pleasing (just as was done for the "soft light" mode). 

Nonetheless, somewhere along the line a mistake was made and GIMP's implementation of "overlay" actually ends up producing identical results to its "soft light" mode. Since the source code itself wasn't identical, this redundant behavior was not noticed until years later.

So why hasn't this bug been fixed? Quite simply there were too many plug-ins, too many users, and too many existing GIMP image files that relied upon the legacy behavior. Changing it was deemed too costly. Perhaps also considered was how the traditional "overlay" mode is not typically as useful for modifying "natural images". 

While I wouldn't characterize #162395 as a "great" bug, it is a long-standing one (that is not likely to be fixed in the near future) with a storied past. 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]