remove a / from the premultiplied path
This commit is contained in:
parent
4b24d82e8c
commit
6da790c1e1
|
@ -124,10 +124,10 @@ typedef VipsConversionClass VipsCompositeClass;
|
||||||
|
|
||||||
G_DEFINE_TYPE( VipsComposite, vips_composite, VIPS_TYPE_CONVERSION );
|
G_DEFINE_TYPE( VipsComposite, vips_composite, VIPS_TYPE_CONVERSION );
|
||||||
|
|
||||||
#define BLEND_PREMULTIPLIED( MODE, OUT, AOUT, SRC1, A1, SRC2, A2 ) { \
|
#define BLEND_PREMULTIPLIED( MODE, OUT, SRC1, A1, SRC2, A2 ) { \
|
||||||
switch( MODE ) { \
|
switch( MODE ) { \
|
||||||
case VIPS_BLEND_MODE_OVER: \
|
case VIPS_BLEND_MODE_OVER: \
|
||||||
OUT = (SRC1 + SRC2 * (1 - A1)) / AOUT; \
|
OUT = (SRC1 + SRC2 * (1 - A1)); \
|
||||||
break; \
|
break; \
|
||||||
\
|
\
|
||||||
default: \
|
default: \
|
||||||
|
@ -157,7 +157,7 @@ G_DEFINE_TYPE( VipsComposite, vips_composite, VIPS_TYPE_CONVERSION );
|
||||||
else { \
|
else { \
|
||||||
for( b = 0; b < bands; b++ ) \
|
for( b = 0; b < bands; b++ ) \
|
||||||
BLEND_PREMULTIPLIED( modei, \
|
BLEND_PREMULTIPLIED( modei, \
|
||||||
pixel[b], aout, \
|
pixel[b], \
|
||||||
src1[b], a1, \
|
src1[b], a1, \
|
||||||
pixel[b], alpha ); \
|
pixel[b], alpha ); \
|
||||||
} \
|
} \
|
||||||
|
|
Loading…
Reference in New Issue