can you check if attached patch fixes subtract mode or makes it even more broken?
вс, 30 окт. 2022 г., 20:58 Andrew Randrianasulu <[email protected]>: > > > вс, 30 окт. 2022 г., 17:21 Phyllis Smith <[email protected]>: > >> The below is very possible (except for the gimp comparison) meaning we >> may be making black where it should be white. But as Andrew implied old >> projects may suddenly provide different unexpected results if we change it. >> >>> I think you see, we are making black areas where gimp was making white >>> areas... >>> >> > > > or may be i get layers order wrong / > > > >> Much work was performed to follow one of many versions of the Overlays >> from various other software packages. In the Description section of the >> Overlays chapter in the manual, it states: >> Divide: Divides source color by destination color. If the source color is >> white, the >> result color is the underlying color. The resulting image is often >> lighter. >> *Mathformula used is different than that used by Gimp*; there is no SVG >> equivalent. >> https://cinelerra-gg.org/download/CinelerraGG_Manual/Arithmetic_Group.html >> >> I believe that CinGG when rewriting the code several years ago attempted >> to follow the algorithm that currently existed in Cinelerra HV version at >> the time, but the image I had included earlier comparing CinGG with HV >> 4.6.1 is so different. One or the other is inconsistent. Changing it to >> match Gimp is not desirable, however it would be great to fix an obvious >> bug. >> > > I found some python description of Adobe's blend modes .... also, blending > and compositing can be two stages of more complex process?? > > > https://github.com/psd-tools/image-blender/blob/master/src/image_blender.pyx > > > see divide/subtract grouped together ... > > > >> On Sun, Oct 30, 2022 at 1:59 AM Andrew Randrianasulu via Cin < >> [email protected]> wrote: >> >>> but should we blindly follow gimp ? Again, gimp tend to have bigger >>> mode list ) may be right thing to do is leave some of our modes intact >>> (they might be buggy but graphics art can utilize that, too) and add >>> gimp/svg/oldcin compatible modes ? >>> >> >> >>> >>> ---------- Forwarded message --------- >>> От: Андрей Рандрианасулу <[email protected]> >>> Date: сб, 29 окт. 2022 г., 18:43 >>> Subject: cingg vs gimp 2.10 compositing mode divide >>> To: randrianasulu <[email protected]> >>> >>> >>> >>> I think you see, we are making black areas where gimp was making white >>> areas... >>> -- >>> Андрей Рандрианасулу >>> -- >>> Cin mailing list >>> [email protected] >>> https://lists.cinelerra-gg.org/mailman/listinfo/cin >>> >>
From c32b0b65695aae1e3c48a2732548f470fbae1586 Mon Sep 17 00:00:00 2001 From: Andrew Randrianasulu <[email protected]> Date: Sun, 30 Oct 2022 21:35:13 +0300 Subject: [PATCH] subtract mode ? --- cinelerra-5.1/cinelerra/overlayframe.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cinelerra-5.1/cinelerra/overlayframe.h b/cinelerra-5.1/cinelerra/overlayframe.h index 13c2e4bd..b364e619 100644 --- a/cinelerra-5.1/cinelerra/overlayframe.h +++ b/cinelerra-5.1/cinelerra/overlayframe.h @@ -57,7 +57,8 @@ // SUBTRACT [(Sa - Da), (Sc - Dc)] #define ALPHA_SUBTRACT(mx, Sa, Da) (Sa - Da) -#define COLOR_SUBTRACT(mx, Sc, Sa, Dc, Da) (Sc - Dc) +#define COLOR_SUBTRACT(mx, Sc, Sa, Dc, Da) \ + (ZERO > (Sc - Dc) ? ZERO : (Sc - Dc)) #define CHROMA_SUBTRACT COLOR_SUBTRACT // MULTIPLY [Sa + Da - Sa*Da, Sc*(1 - Da) + Dc*(1 - Sa) + Sc * Dc] -- 2.38.1
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin

