"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libvips/foreign/webp2vips.c" between
vips-8.10.4.tar.gz and vips-8.10.5.tar.gz

About: VIPS is a free image processing system (see also the GUI nip2).

webp2vips.c  (vips-8.10.4):webp2vips.c  (vips-8.10.5)
skipping to change at line 263 skipping to change at line 263
static guint32 static guint32
blend_pixel( guint32 A, guint32 B ) blend_pixel( guint32 A, guint32 B )
{ {
guint8 aA = getA( A ); guint8 aA = getA( A );
if( aA == 0 ) if( aA == 0 )
return( B ); return( B );
guint8 aB = getA( B ); guint8 aB = getA( B );
guint8 fac = (aB * (256 - aA) + 128) >> 8; guint8 fac = (aB * (255 - aA) + 127) >> 8;
guint8 aR = aA + fac; guint8 aR = aA + fac;
int scale = (1 << 24) / aR; int scale = aR == 0 ? 0 : (1 << 24) / aR;
guint8 rR = BLEND( getR( A ), aA, getR( B ), fac, scale ); guint8 rR = BLEND( getR( A ), aA, getR( B ), fac, scale );
guint8 gR = BLEND( getG( A ), aA, getG( B ), fac, scale ); guint8 gR = BLEND( getG( A ), aA, getG( B ), fac, scale );
guint8 bR = BLEND( getB( A ), aA, getB( B ), fac, scale ); guint8 bR = BLEND( getB( A ), aA, getB( B ), fac, scale );
return( setRGBA( rR, gR, bR, aR ) ); return( setRGBA( rR, gR, bR, aR ) );
} }
/* Blend sub into frame at left, top. /* Blend sub into frame at left, top.
*/ */
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)