cvs: gd /libgd/src gd_crop.c

From: Date: Fri, 28 Dec 2007 16:38:19 +0000
Subject: cvs: gd /libgd/src gd_crop.c
Groups: php.gd.cvs 
Request: Send a blank email to php-gd-cvs+get-386@lists.php.net to get a copy of this message
pajoye Fri Dec 28 16:38:19 2007 UTC Modified files: /gd/libgd/src gd_crop.c Log: - kill compiler warnings - nuke unused variables http://cvs.php.net/viewvc.cgi/gd/libgd/src/gd_crop.c?r1=1.1&r2=1.2&diff_format=u Index: gd/libgd/src/gd_crop.c diff -u gd/libgd/src/gd_crop.c:1.1 gd/libgd/src/gd_crop.c:1.2 --- gd/libgd/src/gd_crop.c:1.1 Wed Dec 12 15:56:03 2007 +++ gd/libgd/src/gd_crop.c Fri Dec 28 16:38:19 2007 @@ -9,6 +9,7 @@ */ #include <gd.h> +#include <stdlib.h> static int gdGuessBackgroundColorFromCorners(gdImagePtr im, int *color); static int gdColorMatch(gdImagePtr im, int col1, int col2, int threshold); @@ -71,9 +72,11 @@ } } - /* Nothing to do > bye */ + /* Nothing to do > bye + * Duplicate the image? + */ if (y == height - 1) { - return; + return NULL; } crop.y = y -1; @@ -115,7 +118,7 @@ const int height = gdImageSY(im); int x,y; - int corners, match; + int match; gdRect crop; crop.x = 0; @@ -123,8 +126,9 @@ crop.width = 0; crop.height = 0; + /* Pierre: crop everything sounds bad */ if (threshold >= 255) { - return; + return NULL; } /* TODO: Add gdImageGetRowPtr and works with ptr at the row level @@ -138,9 +142,12 @@ } } - /* Nothing to do > bye */ + /* Piere + * Nothing to do > bye + * Duplicate the image? + */ if (y == height - 1) { - return; + return NULL; } crop.y = y -1;

« previous php.gd.cvs (#386) next »