- update to 2.0.35
This commit is contained in:
parent
02c6a93a46
commit
c2c4707442
@ -1 +1 @@
|
||||
gd-2.0.34.tar.bz2
|
||||
gd-2.0.35.tar.bz2
|
||||
|
@ -1,71 +0,0 @@
|
||||
--- gd-2.0.33/gd.c.pom 2006-11-16 14:29:57.000000000 +0100
|
||||
+++ gd-2.0.33/gd.c 2006-11-16 14:30:44.000000000 +0100
|
||||
@@ -3075,6 +3075,8 @@
|
||||
/* keep them as 32bits */
|
||||
long x, y, inc;
|
||||
long dx, dy,tmp;
|
||||
+ int w, wid, wstart;
|
||||
+ int thick = im->thick;
|
||||
if (!im->trueColor) {
|
||||
/* TBB: don't crash when the image is of the wrong type */
|
||||
gdImageLine(im, x1, y1, x2, y2, col);
|
||||
@@ -3087,12 +3089,30 @@
|
||||
return;
|
||||
dx = x2 - x1;
|
||||
dy = y2 - y1;
|
||||
-
|
||||
if (dx == 0 && dy == 0) {
|
||||
/* TBB: allow setting points */
|
||||
gdImageSetAAPixelColor(im, x1, y1, col, 0xFF);
|
||||
return;
|
||||
}
|
||||
+ else {
|
||||
+ double ag;
|
||||
+ if (dy < dx)
|
||||
+ ag = cos (atan2 (dy, dx));
|
||||
+ else
|
||||
+ ag = sin (atan2 (dy, dx));
|
||||
+ if (ag != 0)
|
||||
+ {
|
||||
+ wid = thick / ag;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ wid = 1;
|
||||
+ }
|
||||
+ if (wid == 0)
|
||||
+ {
|
||||
+ wid = 1;
|
||||
+ }
|
||||
+ }
|
||||
if (abs(dx) > abs(dy)) {
|
||||
if (dx < 0) {
|
||||
tmp = x1;
|
||||
@@ -3109,8 +3129,11 @@
|
||||
inc = (dy * 65536) / dx;
|
||||
/* TBB: set the last pixel for consistency (<=) */
|
||||
while ((x >> 16) <= x2) {
|
||||
- gdImageSetAAPixelColor(im, x >> 16, y >> 16, col, (y >> 8) & 0xFF);
|
||||
- gdImageSetAAPixelColor(im, x >> 16, (y >> 16) + 1,col, (~y >> 8) & 0xFF);
|
||||
+ wstart = (y >> 16) - wid / 2;
|
||||
+ for (w = wstart; w < wstart + wid; w++) {
|
||||
+ gdImageSetAAPixelColor(im, (x >> 16) , w , col , (y >> 8) & 0xFF);
|
||||
+ gdImageSetAAPixelColor(im, (x >> 16) , w + 1 , col, (~y >> 8) & 0xFF);
|
||||
+ }
|
||||
x += (1 << 16);
|
||||
y += inc;
|
||||
}
|
||||
@@ -3130,8 +3153,11 @@
|
||||
inc = (dx * 65536) / dy;
|
||||
/* TBB: set the last pixel for consistency (<=) */
|
||||
while ((y>>16) <= y2) {
|
||||
- gdImageSetAAPixelColor(im, x >> 16, y >> 16, col, (x >> 8) & 0xFF);
|
||||
- gdImageSetAAPixelColor(im, (x >> 16) + 1, (y >> 16),col, (~x >> 8) & 0xFF);
|
||||
+ wstart = (x >> 16) - wid / 2;
|
||||
+ for (w = wstart; w < wstart + wid; w++) {
|
||||
+ gdImageSetAAPixelColor(im, w , y >> 16 , col, (x >> 8) & 0xFF);
|
||||
+ gdImageSetAAPixelColor(im, w + 1, y >> 16, col, (~x >> 8) & 0xFF);
|
||||
+ }
|
||||
x += inc;
|
||||
y += (1<<16);
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
--- gd-2.0.33/gd_gd.c.overflow 2006-10-31 14:43:06.000000000 +0100
|
||||
+++ gd-2.0.33/gd_gd.c 2006-10-31 14:44:16.000000000 +0100
|
||||
@@ -149,6 +149,10 @@
|
||||
{
|
||||
im = gdImageCreate (*sx, *sy);
|
||||
}
|
||||
+ if (!im)
|
||||
+ {
|
||||
+ goto fail1;
|
||||
+ }
|
||||
if (!_gdGetColors (in, im, gd2xFlag))
|
||||
{
|
||||
goto fail2;
|
||||
--- gd-2.0.33/gd.c.overflow 2006-10-31 14:18:02.000000000 +0100
|
||||
+++ gd-2.0.33/gd.c 2006-10-31 14:27:54.000000000 +0100
|
||||
@@ -2467,6 +2467,8 @@
|
||||
}
|
||||
bytes = (w * h / 8) + 1;
|
||||
im = gdImageCreate (w, h);
|
||||
+ if(!im)
|
||||
+ return 0;
|
||||
gdImageColorAllocate (im, 255, 255, 255);
|
||||
gdImageColorAllocate (im, 0, 0, 0);
|
||||
x = 0;
|
65
gd-2.0.35-AALineThick.patch
Normal file
65
gd-2.0.35-AALineThick.patch
Normal file
@ -0,0 +1,65 @@
|
||||
--- gd-2.0.35/gd.c.pom 2007-06-19 22:25:51.000000000 +0200
|
||||
+++ gd-2.0.35/gd.c 2007-09-05 11:25:16.000000000 +0200
|
||||
@@ -3474,6 +3474,8 @@ static void gdImageAALine (gdImagePtr im
|
||||
/* keep them as 32bits */
|
||||
long x, y, inc;
|
||||
long dx, dy,tmp;
|
||||
+ int w, wid, wstart;
|
||||
+ int thick = im->thick;
|
||||
|
||||
if (!im->trueColor) {
|
||||
/* TBB: don't crash when the image is of the wrong type */
|
||||
@@ -3502,6 +3504,25 @@ static void gdImageAALine (gdImagePtr im
|
||||
gdImageSetAAPixelColor(im, x1, y1, col, 0xFF);
|
||||
return;
|
||||
}
|
||||
+ else {
|
||||
+ double ag;
|
||||
+ if (dy < dx)
|
||||
+ ag = cos (atan2 (dy, dx));
|
||||
+ else
|
||||
+ ag = sin (atan2 (dy, dx));
|
||||
+ if (ag != 0)
|
||||
+ {
|
||||
+ wid = thick / ag;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ wid = 1;
|
||||
+ }
|
||||
+ if (wid == 0)
|
||||
+ {
|
||||
+ wid = 1;
|
||||
+ }
|
||||
+ }
|
||||
if (abs(dx) > abs(dy)) {
|
||||
if (dx < 0) {
|
||||
tmp = x1;
|
||||
@@ -3518,8 +3539,11 @@ static void gdImageAALine (gdImagePtr im
|
||||
inc = (dy * 65536) / dx;
|
||||
/* TBB: set the last pixel for consistency (<=) */
|
||||
while ((x >> 16) <= x2) {
|
||||
- gdImageSetAAPixelColor(im, x >> 16, y >> 16, col, (y >> 8) & 0xFF);
|
||||
- gdImageSetAAPixelColor(im, x >> 16, (y >> 16) + 1,col, (~y >> 8) & 0xFF);
|
||||
+ wstart = (y >> 16) - wid / 2;
|
||||
+ for (w = wstart; w < wstart + wid; w++) {
|
||||
+ gdImageSetAAPixelColor(im, (x >> 16) , w , col , (y >> 8) & 0xFF);
|
||||
+ gdImageSetAAPixelColor(im, (x >> 16) , w + 1 , col, (~y >> 8) & 0xFF);
|
||||
+ }
|
||||
x += (1 << 16);
|
||||
y += inc;
|
||||
}
|
||||
@@ -3539,8 +3563,11 @@ static void gdImageAALine (gdImagePtr im
|
||||
inc = (dx * 65536) / dy;
|
||||
/* TBB: set the last pixel for consistency (<=) */
|
||||
while ((y>>16) <= y2) {
|
||||
- gdImageSetAAPixelColor(im, x >> 16, y >> 16, col, (x >> 8) & 0xFF);
|
||||
- gdImageSetAAPixelColor(im, (x >> 16) + 1, (y >> 16),col, (~x >> 8) & 0xFF);
|
||||
+ wstart = (x >> 16) - wid / 2;
|
||||
+ for (w = wstart; w < wstart + wid; w++) {
|
||||
+ gdImageSetAAPixelColor(im, w , y >> 16 , col, (x >> 8) & 0xFF);
|
||||
+ gdImageSetAAPixelColor(im, w + 1, y >> 16, col, (~x >> 8) & 0xFF);
|
||||
+ }
|
||||
x += inc;
|
||||
y += (1<<16);
|
||||
}
|
13
gd-2.0.35-overflow.patch
Normal file
13
gd-2.0.35-overflow.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- gd-2.0.35/gd_gd.c.pom 2006-04-05 17:52:22.000000000 +0200
|
||||
+++ gd-2.0.35/gd_gd.c 2007-09-05 11:31:39.000000000 +0200
|
||||
@@ -149,6 +149,10 @@ _gdCreateFromFile (gdIOCtx * in, int *sx
|
||||
{
|
||||
im = gdImageCreate (*sx, *sy);
|
||||
}
|
||||
+ if (!im)
|
||||
+ {
|
||||
+ goto fail1;
|
||||
+ }
|
||||
if (!_gdGetColors (in, im, gd2xFlag))
|
||||
{
|
||||
goto fail2;
|
11
gd.spec
11
gd.spec
@ -1,7 +1,7 @@
|
||||
Summary: A graphics library for quick creation of PNG or JPEG images
|
||||
Name: gd
|
||||
Version: 2.0.34
|
||||
Release: 3%{?dist}
|
||||
Version: 2.0.35
|
||||
Release: 1%{?dist}
|
||||
Group: System Environment/Libraries
|
||||
License: MIT and GPL
|
||||
URL: http://www.libgd.org/Main_Page
|
||||
@ -10,8 +10,8 @@ Patch0: gd-2.0.33-freetype.patch
|
||||
Patch3: gd-2.0.34-multilib.patch
|
||||
Patch4: gd-loop.patch
|
||||
Patch5: gd-2.0.34-sparc64.patch
|
||||
Patch6: gd-2.0.33-overflow.patch
|
||||
Patch7: gd-2.0.33-AALineThick.patch
|
||||
Patch6: gd-2.0.35-overflow.patch
|
||||
Patch7: gd-2.0.35-AALineThick.patch
|
||||
Patch8: gd-2.0.33-BoxBound.patch
|
||||
Patch9: gd-2.0.34-fonts.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
@ -100,6 +100,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Sep 18 2007 Ivana Varekova <varekova@redhat.com> 2.0.35-1
|
||||
- update to 2.0.35
|
||||
|
||||
* Tue Sep 4 2007 Ivana Varekova <varekova@redhat.com> 2.0.34-3
|
||||
- fix font paths (#225786#5)
|
||||
- fix pkgconfig Libs flag (#225786#4)
|
||||
|
Loading…
Reference in New Issue
Block a user