Issue #2 resolved
Anonymous created an issue

{{{
diff -ru8i src/gd_filter.c src.new/gd_filter.c
--- src/gd_filter.c 2011-05-14 13:38:26 +0800
+++ src.new/gd_filter.c 2011-06-17 10:25:10 +0800
@@ -13,28 +13,28 @@
#define GET_PIXEL_FUNCTION(src)(src->trueColor ? gdImageGetTrueColorPixel : gdImageGetPixel)

#ifdef WIN32
# define GD_SCATTER_SEED() (unsigned int)(time(0) * GetCurrentProcessId())
#else
# define GD_SCATTER_SEED() (unsigned int)(time(0) * getpid())
#endif

-int gdImageScatter(gdImagePtr im, int sub, int plus)
+BGD_DECLARE(int) gdImageScatter(gdImagePtr im, int sub, int plus)
{
gdScatter s;

s.sub  = sub;
s.plus = plus;
s.num_colors = 0;
s.seed = GD_SCATTER_SEED();
return gdImageScatterEx(im, &s);

}

-int gdImageScatterColor(gdImagePtr im, int sub, int plus, int colors[], unsigned int num_colors)
+BGD_DECLARE(int) gdImageScatterColor(gdImagePtr im, int sub, int plus, int colors[], unsigned int num_colors)
{
gdScatter s;

s.sub  = sub;
s.plus = plus;
s.colors = colors;
s.num_colors = num_colors;
s.seed = GD_SCATTER_SEED();

@@ -48,17 +48,17 @@
if (!gdImageBoundsSafe(im, dest_x, dest_y)) { \ continue; \ } \ \ pxl = f(im, x, y); \ new_pxl = f(im, dest_x, dest_y); \ } while (0)

-int gdImageScatterEx(gdImagePtr im, gdScatterPtr scatter)
+BGD_DECLARE(int) gdImageScatterEx(gdImagePtr im, gdScatterPtr scatter)
{
register int x, y;
int dest_x, dest_y;
int pxl, new_pxl;
unsigned int n;
int sub = scatter->sub, plus = scatter->plus;
PIXEL_FUNCTION_DECLARE(f);

diff -ru8i src/gd_pixelate.c src.new/gd_pixelate.c
--- src/gd_pixelate.c 2011-05-14 13:38:26 +0800
+++ src.new/gd_pixelate.c 2011-06-17 10:25:34 +0800
@@ -1,11 +1,11 @@
#include "gd.h"

-int gdImagePixelate(gdImagePtr im, int block_size, const unsigned int mode)
+BGD_DECLARE(int) gdImagePixelate(gdImagePtr im, int block_size, const unsigned int mode)
{
int x, y;

if (block_size <= 0) {
    return 0;
} else if (block_size == 1) {
    return 1;
}

}}}

Comments (1)

  1. Log in to comment