"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/gd_crop.c" between
libgd-2.3.0.tar.gz and libgd-2.3.1.tar.gz

About: LibGD is a library for the dynamic creation of images by programmers (PNG, JPEG, GIF, WebP, XPM, BMP support).

gd_crop.c  (libgd-2.3.0):gd_crop.c  (libgd-2.3.1)
skipping to change at line 292 skipping to change at line 292
return 2; return 2;
} else if (tr == bl || tr == br) { } else if (tr == bl || tr == br) {
*color = tr; *color = tr;
return 2; return 2;
} else if (br == bl) { } else if (br == bl) {
*color = bl; *color = bl;
return 2; return 2;
} else { } else {
register int r,b,g,a; register int r,b,g,a;
r = (int)(0.5f + (gdImageRed(im, tl) + gdImageRed(im, tr) + gdIma r = (2 + gdImageRed(im, tl) + gdImageRed(im, tr) + gdImageRed(im,
geRed(im, bl) + gdImageRed(im, br)) / 4); bl) + gdImageRed(im, br)) / 4;
g = (int)(0.5f + (gdImageGreen(im, tl) + gdImageGreen(im, tr) + g g = (2 + gdImageGreen(im, tl) + gdImageGreen(im, tr) + gdImageGre
dImageGreen(im, bl) + gdImageGreen(im, br)) / 4); en(im, bl) + gdImageGreen(im, br)) / 4;
b = (int)(0.5f + (gdImageBlue(im, tl) + gdImageBlue(im, tr) + gdI b = (2 + gdImageBlue(im, tl) + gdImageBlue(im, tr) + gdImageBlue(
mageBlue(im, bl) + gdImageBlue(im, br)) / 4); im, bl) + gdImageBlue(im, br)) / 4;
a = (int)(0.5f + (gdImageAlpha(im, tl) + gdImageAlpha(im, tr) + g a = (2 + gdImageAlpha(im, tl) + gdImageAlpha(im, tr) + gdImageAlp
dImageAlpha(im, bl) + gdImageAlpha(im, br)) / 4); ha(im, bl) + gdImageAlpha(im, br)) / 4;
*color = gdImageColorClosestAlpha(im, r, g, b, a); *color = gdImageColorClosestAlpha(im, r, g, b, a);
return 0; return 0;
} }
} }
 End of changes. 1 change blocks. 
8 lines changed or deleted 8 lines changed or added

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