Debian Bug report logs - #298061
php4-gd: Please include bundled version of GD

Package: php5; Maintainer for php5 is (unknown);

Reported by: Reine Johansson <brain@bredband.net>

Date: Fri, 4 Mar 2005 12:03:01 UTC

Severity: wishlist

Tags: wontfix

Done: sean finney <seanius@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Adam Conrad <adconrad@0c3.net>:
Bug#298061; Package php4-gd. (full text, mbox, link).


Acknowledgement sent to Reine Johansson <brain@bredband.net>:
New Bug report received and forwarded. Copy sent to Adam Conrad <adconrad@0c3.net>. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Reine Johansson <brain@bredband.net>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: php4-gd: Please include bundled version of GD
Date: Fri, 04 Mar 2005 12:45:22 +0100
Package: php4-gd
Version: 4:4.3.10-8
Severity: wishlist

Please use the bundled version of GD. As it is now, It's not possible to
use the function imagerotate() that is only available in the bundled version.

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.10
Locale: LANG=sv_SE, LC_CTYPE=sv_SE (charmap=ISO-8859-1)

Versions of packages php4-gd depends on:
ii  debconf [debconf-2.0]    1.4.30.11       Debian configuration management sy
ii  libapache-mod-php4 [phpa 4:4.3.10-8      server-side, HTML-embedded scripti
ii  libc6                    2.3.2.ds1-20    GNU C Library: Shared libraries an
ii  libfreetype6             2.1.7-2.3       FreeType 2 font engine, shared lib
ii  libgd2-xpm               2.0.33-1.1      GD Graphics Library version 2
ii  libjpeg62                6b-9            The Independent JPEG Group's JPEG 
ii  libpng12-0               1.2.8rel-1      PNG library - runtime
ii  libt1-5                  5.0.2-3         Type 1 font rasterizer library - r
ii  libx11-6                 4.3.0.dfsg.1-10 X Window System protocol client li
ii  libxpm4                  4.3.0.dfsg.1-10 X pixmap library
ii  php4-common              4:4.3.10-8      Common files for packages built fr
ii  xlibs                    4.3.0.dfsg.1-10 X Keyboard Extension (XKB) configu
ii  zlib1g                   1:1.2.2-3       compression library - runtime

-- debconf information:
  php4/extension_gd_apache: true
  php4/add_extension: true
  php4/remove_extension: true



Information forwarded to debian-bugs-dist@lists.debian.org, Adam Conrad <adconrad@0c3.net>:
Bug#298061; Package php4-gd. (full text, mbox, link).


Acknowledgement sent to Steve Langasek <vorlon@debian.org>:
Extra info received and forwarded to list. Copy sent to Adam Conrad <adconrad@0c3.net>. (full text, mbox, link).


Message #10 received at 298061@bugs.debian.org (full text, mbox, reply):

From: Steve Langasek <vorlon@debian.org>
To: Reine Johansson <brain@bredband.net>, 298061@bugs.debian.org
Subject: Re: Bug#298061: php4-gd: Please include bundled version of GD
Date: Sat, 26 Mar 2005 23:56:44 -0800
[Message part 1 (text/plain, inline)]
tags 298061 wontfix
thanks

On Fri, Mar 04, 2005 at 12:45:22PM +0100, Reine Johansson wrote:
> Please use the bundled version of GD. As it is now, It's not possible to
> use the function imagerotate() that is only available in the bundled version.

This isn't going to happen.  It is a burden on the security team to ship
bundled copies of a library in a package; if these features of the bundled
GD library are important, they should be made available in the upstream
version.

-- 
Steve Langasek
postmodern programmer
[signature.asc (application/pgp-signature, inline)]

Tags added: wontfix Request was from Steve Langasek <vorlon@debian.org> to control@bugs.debian.org. (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Adam Conrad <adconrad@0c3.net>:
Bug#298061; Package php4-gd. (full text, mbox, link).


Acknowledgement sent to Reine Johansson <brain@bredband.net>:
Extra info received and forwarded to list. Copy sent to Adam Conrad <adconrad@0c3.net>. (full text, mbox, link).


Message #17 received at 298061@bugs.debian.org (full text, mbox, reply):

From: Reine Johansson <brain@bredband.net>
To: Steve Langasek <vorlon@debian.org>
Cc: 298061@bugs.debian.org
Subject: Re: Bug#298061: php4-gd: Please include bundled version of GD
Date: Sat, 2 Apr 2005 00:17:27 +0200
On Sat, 26 Mar 2005 23:56:44 -0800
Steve Langasek <vorlon@debian.org> wrote:

> tags 298061 wontfix
> thanks
> 
> On Fri, Mar 04, 2005 at 12:45:22PM +0100, Reine Johansson wrote:
> > Please use the bundled version of GD. As it is now, It's not
> > possible to use the function imagerotate() that is only available in
> > the bundled version.
> 
> This isn't going to happen.  It is a burden on the security team to
> ship bundled copies of a library in a package; if these features of
> the bundled GD library are important, they should be made available in
> the upstream version.

But why not take the bundled GD and create a new package
(php4-bundled-gd). As I've said before (and you probably already know)
it's impossible to use imagerotate() with Debian, unless I compile php4
myself, and loose the pros with APT. imagerotate is a quite often used
function on LAMP-installations. It's quite sad that it's a problem to
use this with debian on the server.

/Reine



Information forwarded to debian-bugs-dist@lists.debian.org, Adam Conrad <adconrad@0c3.net>:
Bug#298061; Package php4-gd. (full text, mbox, link).


Acknowledgement sent to Steve Langasek <vorlon@debian.org>:
Extra info received and forwarded to list. Copy sent to Adam Conrad <adconrad@0c3.net>. (full text, mbox, link).


Message #22 received at 298061@bugs.debian.org (full text, mbox, reply):

From: Steve Langasek <vorlon@debian.org>
To: Reine Johansson <brain@bredband.net>
Cc: 298061@bugs.debian.org, libgd2@packages.debian.org
Subject: Re: Bug#298061: php4-gd: Please include bundled version of GD
Date: Fri, 1 Apr 2005 16:15:48 -0800
[Message part 1 (text/plain, inline)]
On Sat, Apr 02, 2005 at 12:17:27AM +0200, Reine Johansson wrote:

> > > Please use the bundled version of GD. As it is now, It's not
> > > possible to use the function imagerotate() that is only available in
> > > the bundled version.

> > This isn't going to happen.  It is a burden on the security team to
> > ship bundled copies of a library in a package; if these features of
> > the bundled GD library are important, they should be made available in
> > the upstream version.

> But why not take the bundled GD and create a new package
> (php4-bundled-gd).

Because that would still mean carrying around two copies of the same
library, which is still a burden on the security team.  If you think Debian
needs to be shipping a different libgd version, please talk to the libgd2
maintainer.

-- 
Steve Langasek
postmodern programmer
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Adam Conrad <adconrad@0c3.net>:
Bug#298061; Package php4-gd. (full text, mbox, link).


Acknowledgement sent to Jonas Smedegaard <dr@jones.dk>:
Extra info received and forwarded to list. Copy sent to Adam Conrad <adconrad@0c3.net>. (full text, mbox, link).


Message #27 received at 298061@bugs.debian.org (full text, mbox, reply):

From: Jonas Smedegaard <dr@jones.dk>
To: Steve Langasek <vorlon@debian.org>
Cc: Reine Johansson <brain@bredband.net>, 298061@bugs.debian.org, libgd2@packages.debian.org
Subject: Re: Bug#298061: php4-gd: Please include bundled version of GD
Date: Sat, 02 Apr 2005 11:24:18 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02-04-2005 02:15, Steve Langasek wrote:
> On Sat, Apr 02, 2005 at 12:17:27AM +0200, Reine Johansson wrote:
> 
> 
>>>>Please use the bundled version of GD. As it is now, It's not
>>>>possible to use the function imagerotate() that is only available in
>>>>the bundled version.
> 
> 
>>>This isn't going to happen.  It is a burden on the security team to
>>>ship bundled copies of a library in a package; if these features of
>>>the bundled GD library are important, they should be made available in
>>>the upstream version.
> 
> 
>>But why not take the bundled GD and create a new package
>>(php4-bundled-gd).
> 
> 
> Because that would still mean carrying around two copies of the same
> library, which is still a burden on the security team.  If you think Debian
> needs to be shipping a different libgd version, please talk to the libgd2
> maintainer.

Can you provide me a patch implementing the imagerotate() function? I
can then suggest upstream to adopt the improvement. Or you can do so
directly if you like (upstream doesn't bit, to my knowledge ;-) ).

As I understand it, the GD authro is not the most responsive one, and
the PHP guys now maintains a fork of GD. Obviously that approach doesn't
please the GD author, so if someone else than the PHP guys (Debian, for
example) provides isolated, well-prepared suggestions for upstream
inclusion that probably has a better chance than if done from PHP.

Naturally, we would all benefit from a single source of GD, right?


Regards,

 - Jonas

Debian package maintainer of GD

- --
* Jonas Smedegaard - idealist og Internet-arkitekt
* Tlf.: +45 40843136  Website: http://dr.jones.dk/

 - Enden er nær: http://www.shibumi.org/eoti.htm
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCTmTBn7DbMsAkQLgRAo+mAJ4qVrSrwMg485A+wE4SgUa5CPoViQCfdir/
K9HdP4epfBOvJpppVHkYgJg=
=37AX
-----END PGP SIGNATURE-----



Information forwarded to debian-bugs-dist@lists.debian.org, Adam Conrad <adconrad@0c3.net>:
Bug#298061; Package php4-gd. (full text, mbox, link).


Acknowledgement sent to Reine Johansson <brain@bredband.net>:
Extra info received and forwarded to list. Copy sent to Adam Conrad <adconrad@0c3.net>. (full text, mbox, link).


Message #32 received at 298061@bugs.debian.org (full text, mbox, reply):

From: Reine Johansson <brain@bredband.net>
To: Jonas Smedegaard <dr@jones.dk>
Cc: vorlon@debian.org, 298061@bugs.debian.org, libgd2@packages.debian.org
Subject: Re: Bug#298061: php4-gd: Please include bundled version of GD
Date: Tue, 19 Apr 2005 13:05:24 +0200
On Sat, 02 Apr 2005 11:24:18 +0200
Jonas Smedegaard <dr@jones.dk> wrote:

> >>But why not take the bundled GD and create a new package
> >>(php4-bundled-gd).
> > 
> > Because that would still mean carrying around two copies of the same
> > library, which is still a burden on the security team.  If you think
> > Debian needs to be shipping a different libgd version, please talk
> > to the libgd2 maintainer.
> 
> Can you provide me a patch implementing the imagerotate() function? I
> can then suggest upstream to adopt the improvement. Or you can do so
> directly if you like (upstream doesn't bit, to my knowledge ;-) ).
> 

Sorry for the very late reply. First I must mention that my programming
skills isn't adequate for me to port/implement the imagerotate() in
libgd. I wish I could thou. =)

I've done some research and I've found gdImageCopyRotated() in libgd
[1], but it does not seem to be accessible within PHP [2]. Why? If I
have understood this correctly, PHP is using libgd2-xpm instead of the
bundled one, and gdImageCopyRotated() is available in libgd2-xpm, so why
isn't it accessible from PHP?

I was thinking I could write my own imagerotate() (in PHP) as a wrapper
for gdImageCopyRotated(). This seems like the easiest way for me to be
able to use a compatible imagerotate() and still enjoy the wonders of
APT (i.e. using libgd2-xpm istead of the bundled GD which "isn't
available" on debiansystems.)

/Reine

[1] http://www.boutell.com/gd/manual2.0.33.html#copying (scroll down a
bit)
[2] get_defined_functions();  // PHP - prints all defined functions. But
imagecopyrotated() isn't listed.



Information forwarded to debian-bugs-dist@lists.debian.org, Adam Conrad <adconrad@0c3.net>:
Bug#298061; Package php4-gd. (full text, mbox, link).


Acknowledgement sent to Jonas Smedegaard <dr@jones.dk>:
Extra info received and forwarded to list. Copy sent to Adam Conrad <adconrad@0c3.net>. (full text, mbox, link).


Message #37 received at 298061@bugs.debian.org (full text, mbox, reply):

From: Jonas Smedegaard <dr@jones.dk>
To: 298061@bugs.debian.org
Cc: Steve Langasek <vorlon@debian.org>, Reine Johansson <brain@bredband.net>
Subject: Re: Bug#298061: php4-gd: Please include bundled version of GD
Date: Tue, 19 Apr 2005 13:27:39 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 19-04-2005 13:05, Reine Johansson wrote:

> I've done some research and I've found gdImageCopyRotated() in libgd
> [1], but it does not seem to be accessible within PHP [2]. Why? If I
> have understood this correctly, PHP is using libgd2-xpm instead of the
> bundled one, and gdImageCopyRotated() is available in libgd2-xpm, so why
> isn't it accessible from PHP?

I guess the reason is that each function must be wrapped in the PHP code.

> I was thinking I could write my own imagerotate() (in PHP) as a wrapper
> for gdImageCopyRotated(). This seems like the easiest way for me to be
> able to use a compatible imagerotate() and still enjoy the wonders of
> APT (i.e. using libgd2-xpm istead of the bundled GD which "isn't
> available" on debiansystems.)

I guess you mean to hack the php package to have both imagerotate() and
a new imagerotated() use imagerotated() from GD, right? That sounds sane
to me. Please post a diff of your tweak to this bugreport if/when you
get something working.


> [1] http://www.boutell.com/gd/manual2.0.33.html#copying (scroll down a
> bit)
> [2] get_defined_functions();  // PHP - prints all defined functions. But
> imagecopyrotated() isn't listed.

I assume your test was to invoke the PHP-wrapped get_defined_functions()
rather than the GD one directly. I guess the wrapped one presents only
the functions known to the wrapper.


Kind regards,

 - Jonas

- --
* Jonas Smedegaard - idealist og Internet-arkitekt
* Tlf.: +45 40843136  Website: http://dr.jones.dk/

 - Enden er nær: http://www.shibumi.org/eoti.htm
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCZOsrn7DbMsAkQLgRAmf3AJ9rV9s3VpKMJ3nu4MWF+TxFcGLlsQCfX8h4
iBU60a1PPOq10MFQvCGqWbw=
=Cl1o
-----END PGP SIGNATURE-----



Information forwarded to debian-bugs-dist@lists.debian.org, Adam Conrad <adconrad@0c3.net>:
Bug#298061; Package php4-gd. (full text, mbox, link).


Acknowledgement sent to Reine Johansson <brain@bredband.net>:
Extra info received and forwarded to list. Copy sent to Adam Conrad <adconrad@0c3.net>. (full text, mbox, link).


Message #42 received at 298061@bugs.debian.org (full text, mbox, reply):

From: Reine Johansson <brain@bredband.net>
To: Jonas Smedegaard <dr@jones.dk>
Cc: 298061@bugs.debian.org, vorlon@debian.org
Subject: Re: Bug#298061: php4-gd: Please include bundled version of GD
Date: Thu, 21 Apr 2005 18:40:29 +0200
On Tue, 19 Apr 2005 13:27:39 +0200
Jonas Smedegaard <dr@jones.dk> wrote:

> > I was thinking I could write my own imagerotate() (in PHP) as a
> > wrapper for gdImageCopyRotated(). This seems like the easiest way
> > for me to be able to use a compatible imagerotate() and still enjoy
> > the wonders of APT (i.e. using libgd2-xpm istead of the bundled GD
> > which "isn't available" on debiansystems.)
> 
> I guess you mean to hack the php package to have both imagerotate()
> and a new imagerotated() use imagerotated() from GD, right? That
> sounds sane to me. Please post a diff of your tweak to this bugreport
> if/when you get something working.

Well, not exactly. My intension is not to hack any package (php/gd).
What I was thinking was that if users on my server is used to using
imagerotate() in their PHP-code, I must somehow deliver it to them. As I
saw gdImageCopyRotated() was available in libgd2-xpm, I figured I could
use that one instead. The thing is that that function and imagerotate() in
the bundled GD is not the same, which forces me to write a wrapper called
imagerotate() in PHP and say to the users; "If you want to use
imagerotate() you have to include this [rotatewrapper.php] file in your
php-document.

/* rotatewrapper.php */
function imagerotate(....)  /* simulating the imagerotate() in bundled GD
{
.....
ImageCopyRotated(....)   /* using gdImageCopyRotated() from libgd2-xpm in debian
....
}

However... gdImageCopyRotated doesn't seem to be available in PHP on
debiansystems despite the fact that php4-gd is using libgd2-xpm (in
which gdImageCopyRotated is available). As Jonas said earlier, maybe this is
because that particular function from libgd2-xpm isn't being "wrapped in
the PHP code". So I think my question to Adam Conrad is, why can't I use
gdImageCopyRotated from libgd2-xpm ? Is this intentional ? If so, why?

/Reine



Information forwarded to debian-bugs-dist@lists.debian.org, Adam Conrad <adconrad@0c3.net>:
Bug#298061; Package php4-gd. (full text, mbox, link).


Acknowledgement sent to Jonas Smedegaard <dr@jones.dk>:
Extra info received and forwarded to list. Copy sent to Adam Conrad <adconrad@0c3.net>. (full text, mbox, link).


Message #47 received at 298061@bugs.debian.org (full text, mbox, reply):

From: Jonas Smedegaard <dr@jones.dk>
To: 298061@bugs.debian.org
Cc: Reine Johansson <brain@bredband.net>, Steve Langasek <vorlon@debian.org>
Subject: Re: Bug#298061: php4-gd: Please include bundled version of GD
Date: Fri, 22 Apr 2005 11:56:17 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 21-04-2005 18:40, Reine Johansson wrote:
> On Tue, 19 Apr 2005 13:27:39 +0200
> Jonas Smedegaard <dr@jones.dk> wrote:
> 
> 
>>>I was thinking I could write my own imagerotate() (in PHP) as a
>>>wrapper for gdImageCopyRotated(). This seems like the easiest way
>>>for me to be able to use a compatible imagerotate() and still enjoy
>>>the wonders of APT (i.e. using libgd2-xpm istead of the bundled GD
>>>which "isn't available" on debiansystems.)
>>
>>I guess you mean to hack the php package to have both imagerotate()
>>and a new imagerotated() use imagerotated() from GD, right? That
>>sounds sane to me. Please post a diff of your tweak to this bugreport
>>if/when you get something working.
> 
> 
> Well, not exactly. My intension is not to hack any package (php/gd).
> What I was thinking was that if users on my server is used to using
> imagerotate() in their PHP-code, I must somehow deliver it to them. As I
> saw gdImageCopyRotated() was available in libgd2-xpm, I figured I could
> use that one instead. The thing is that that function and imagerotate() in
> the bundled GD is not the same, which forces me to write a wrapper called
> imagerotate() in PHP and say to the users; "If you want to use
> imagerotate() you have to include this [rotatewrapper.php] file in your
> php-document.

Think globally, please :-)

Such wrapper script might be beneficial to others than your users, so
please post it here as a workaround, until maybe it will be implemented
within the php4-gd module itself some day.


 - Jonas

- --
* Jonas Smedegaard - idealist og Internet-arkitekt
* Tlf.: +45 40843136  Website: http://dr.jones.dk/

 - Enden er nær: http://www.shibumi.org/eoti.htm
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCaMpBn7DbMsAkQLgRAl9CAJ9gnJb733SNk2o+MsSLNgASz5bmVACfWbhf
IPXNDIfi8wMAL/GwtCSa6aE=
=OJ3b
-----END PGP SIGNATURE-----



Information forwarded to debian-bugs-dist@lists.debian.org, Adam Conrad <adconrad@0c3.net>:
Bug#298061; Package php4-gd. (full text, mbox, link).


Acknowledgement sent to Reine Johansson <brain@bredband.net>:
Extra info received and forwarded to list. Copy sent to Adam Conrad <adconrad@0c3.net>. (full text, mbox, link).


Message #52 received at 298061@bugs.debian.org (full text, mbox, reply):

From: Reine Johansson <brain@bredband.net>
To: Jonas Smedegaard <dr@jones.dk>
Cc: 298061@bugs.debian.org, vorlon@debian.org
Subject: Re: Bug#298061: php4-gd: Please include bundled version of GD
Date: Fri, 22 Apr 2005 13:35:34 +0200
On Fri, 22 Apr 2005 11:56:17 +0200
Jonas Smedegaard <dr@jones.dk> wrote:

> Think globally, please :-)
> 
> Such wrapper script might be beneficial to others than your users, so
> please post it here as a workaround, until maybe it will be
> implemented within the php4-gd module itself some day.

Will do! As soon as I can use gdImageCopyRotated() in PHP-code I will
post my code here! So, again.. Adam, why can't I use libgd2-xpm's
gdImageCopyRotated() in PHP ? =)

/Reine



Information forwarded to debian-bugs-dist@lists.debian.org, Adam Conrad <adconrad@0c3.net>:
Bug#298061; Package php4-gd. (full text, mbox, link).


Acknowledgement sent to Reine Johansson <brain@bredband.net>:
Extra info received and forwarded to list. Copy sent to Adam Conrad <adconrad@0c3.net>. (full text, mbox, link).


Message #57 received at 298061@bugs.debian.org (full text, mbox, reply):

From: Reine Johansson <brain@bredband.net>
To: 298061@bugs.debian.org
Subject: Temporary solution to the abscence of imagerotate()
Date: Tue, 3 May 2005 14:51:27 +0200
As a temporary solution to the missing imagerotate() I now use this piece of code, and include
it in those php-files that is dependent on the function imagerotate()

<?
function imagerotate($src, $angle, $dummy) {
	$width = imagesx($src);
	$height = imagesy($src);

	if ($angle == 90 || $angle == 270) 
	  $dst = imagecreatetruecolor($height, $width);
	else
	  $dst = imagecreatetruecolor($width, $height);
	

	for ($y = 0 ; $y < $height ; $y++) {
		for($x=0;$x<$width;$x++) {
			switch ($angle) {
        		case 90:
        	  		imagecopy($dst, $src, $height-$y-1, $x, $x, $y, 1, 1);
        	  		break;
        		case 180:
        	  		imagecopy($dst, $src, $x, $y, $width-$x-1, $height-$y-1, 1, 1);
        	  		break;
        		case 270:
        	 		imagecopy($dst, $src, $y, $width-$x-1, $x, $y, 1, 1);
        	  		break;
        	 	default:
        	  		imagecopy($dst, $src, $x, $y, $x, $y, 1, 1);
    	  	}
	   	}
	}
	imagedestroy($src);
	return($dst);
}



Information forwarded to debian-bugs-dist@lists.debian.org, Adam Conrad <adconrad@0c3.net>:
Bug#298061; Package php4-gd. (full text, mbox, link).


Acknowledgement sent to Cyril Bouthors <cyril@bouthors.org>:
Extra info received and forwarded to list. Copy sent to Adam Conrad <adconrad@0c3.net>. (full text, mbox, link).


Message #62 received at 298061@bugs.debian.org (full text, mbox, reply):

From: Cyril Bouthors <cyril@bouthors.org>
To: 298061@bugs.debian.org
Subject: Image corruption with the imagerotate() workaround function
Date: Sat, 30 Jul 2005 01:53:42 +0300
[Message part 1 (text/plain, inline)]
Reine,

I've tried the alternate function you provide with Coppermine Photo
Gallery but it corrupted my test pictures: the upper and lower 33% of
the picture is now black after 4 consecutive rotations of 90 degrees.

I guess this function might work under some very specific environments
like Reine's but please use carefully.
-- 
Cyril Bouthors
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Adam Conrad <adconrad@0c3.net>:
Bug#298061; Package php4-gd. (full text, mbox, link).


Acknowledgement sent to Cyril Bouthors <cyb@debian.org>:
Extra info received and forwarded to list. Copy sent to Adam Conrad <adconrad@0c3.net>. (full text, mbox, link).


Message #67 received at 298061@bugs.debian.org (full text, mbox, reply):

From: Cyril Bouthors <cyb@debian.org>
To: 298061@bugs.debian.org
Subject: Image corruption with the imagerotate() workaround function
Date: Sat, 30 Jul 2005 01:53:50 +0300
[Message part 1 (text/plain, inline)]
Reine,

I've tried the alternate function you provide with Coppermine Photo
Gallery but it corrupted my test pictures: the upper and lower 33% of
the picture is now black after 4 consecutive rotations of 90 degrees.

I guess this function might work under some very specific environments
like Reine's but please use carefully.
-- 
Cyril Bouthors
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#298061; Package php4-gd. (full text, mbox, link).


Acknowledgement sent to "Justin Lawrence" <jl@irj.co.za>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (full text, mbox, link).


Message #72 received at 298061@bugs.debian.org (full text, mbox, reply):

From: "Justin Lawrence" <jl@irj.co.za>
To: 298061@bugs.debian.org
Subject: mage corruption with the imagerotate() workaround function
Date: Wed, 4 Apr 2007 15:48:37 +0200
This missing imagerotate function just cost me a day of downtime. It
was just really difficult to Google for the right stuff to find this
bug report somehow.

>> Please use the bundled version of GD. As it is now, It's not possible to
>> use the function imagerotate() that is only available in the bundled version.

Would this be achieved by not having php5-gd installed? (therefore
using the built-in bundled GD?). Or would I have to recompile the
sources?

Anyway, for the moment, I'm going to try adding a custom imagerotate
function and seeing how that works out for me. I've heard that image
quality is lost using imagerotate.

Cyril, I'm not sure if it'll help, but here's another derivative of
imageRotate that might work better for you (from
http://www.php.net/manual/en/function.imagerotate.php)

function imageRotate($src_img, $angle) {

    $src_x = imagesx($src_img);
    $src_y = imagesy($src_img);
    if ($angle == 90 || $angle == -910) {
        $dest_x = $src_y;
        $dest_y = $src_x;
    } else {
        $dest_x = $src_x;
        $dest_y = $src_y;
    }

    $rotate=imagecreatetruecolor($dest_x,$dest_y);
    imagealphablending($rotate, false);

    switch ($angle) {
        case 90:
            for ($y = 0; $y < ($src_y); $y++) {
                for ($x = 0; $x < ($src_x); $x++) {
                    $color = imagecolorat($src_img, $x, $y);
                    imagesetpixel($rotate, $dest_x - $y - 1, $x, $color);
                }
            }
            break;
        case -90:
            for ($y = 0; $y < ($src_y); $y++) {
                for ($x = 0; $x < ($src_x); $x++) {
                    $color = imagecolorat($src_img, $x, $y);
                    imagesetpixel($rotate, $y, $dest_y - $x - 1, $color);
                }
            }
            break;
        case 180:
            for ($y = 0; $y < ($src_y); $y++) {
                for ($x = 0; $x < ($src_x); $x++) {
                    $color = imagecolorat($src_img, $x, $y);
                    imagesetpixel($rotate, $dest_x - $x - 1, $dest_y
- $y - 1, $color);
                }
            }
            break;
        default: $rotate = $src_img;
    };
    return $rotate;
}


-- 
Regards
Justin Lawrence



Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#298061; Package php4-gd. (full text, mbox, link).


Acknowledgement sent to sean finney <seanius@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (full text, mbox, link).


Message #77 received at 298061@bugs.debian.org (full text, mbox, reply):

From: sean finney <seanius@debian.org>
To: Justin Lawrence <jl@irj.co.za>, 298061@bugs.debian.org
Subject: Re: [php-maint] Bug#298061: mage corruption with the imagerotate() workaround function
Date: Wed, 04 Apr 2007 18:47:06 +0200
[Message part 1 (text/plain, inline)]
hi,

On Wed, 2007-04-04 at 15:48 +0200, Justin Lawrence wrote:
> This missing imagerotate function just cost me a day of downtime. It
> was just really difficult to Google for the right stuff to find this
> bug report somehow.
> 
> >> Please use the bundled version of GD. As it is now, It's not possible to
> >> use the function imagerotate() that is only available in the bundled version.
> 
> Would this be achieved by not having php5-gd installed? (therefore
> using the built-in bundled GD?). Or would I have to recompile the
> sources?

you'd probably need to recompile the sources.  iirc open up debian/rules
and remove the stuff about external gd but keep it enabled (also you
might want to browse through the patches dir in case we have something
there too).

really, the *real* solution to this problem would be for someone to do
the work to send the relevant patches in the php version of gd upstream
to the gd author.  you might want to talk to the current gd maintainer
too.


	sean
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#298061; Package php4-gd. (full text, mbox, link).


Acknowledgement sent to Marco Rodrigues <gothicx@sapo.pt>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (full text, mbox, link).


Message #82 received at 298061@bugs.debian.org (full text, mbox, reply):

From: Marco Rodrigues <gothicx@sapo.pt>
To: 397451@bugs.debian.org, 147107@bugs.debian.org, 418598@bugs.debian.org, 411112@bugs.debian.org, 311267@bugs.debian.org, 292125@bugs.debian.org, 338086@bugs.debian.org, 159220@bugs.debian.org, 305302@bugs.debian.org, 361789@bugs.debian.org, 299773@bugs.debian.org, 263939@bugs.debian.org, 340642@bugs.debian.org, 215727@bugs.debian.org, 336548@bugs.debian.org, 225845@bugs.debian.org, 151498@bugs.debian.org, 307479@bugs.debian.org, 424937@bugs.debian.org, 311773@bugs.debian.org, 329548@bugs.debian.org, 423427@bugs.debian.org, 381874@bugs.debian.org, 429982@bugs.debian.org, 399259@bugs.debian.org, 375918@bugs.debian.org, 346145@bugs.debian.org, 297866@bugs.debian.org, 379243@bugs.debian.org, 308050@bugs.debian.org, 269471@bugs.debian.org, 424340@bugs.debian.org, 401065@bugs.debian.org, 173683@bugs.debian.org, 364310@bugs.debian.org, 396734@bugs.debian.org, 394644@bugs.debian.org, 286325@bugs.debian.org, 295388@bugs.debian.org, 308793@bugs.debian.org, 183726@bugs.debian.org, 248288@bugs.debian.org, 346176@bugs.debian.org, 147626@bugs.debian.org, 239368@bugs.debian.org, 302125@bugs.debian.org, 349891@bugs.debian.org, 166161@bugs.debian.org, 419802@bugs.debian.org, 329799@bugs.debian.org, 183784@bugs.debian.org, 135543@bugs.debian.org, 341864@bugs.debian.org, 110368@bugs.debian.org, 197987@bugs.debian.org, 152216@bugs.debian.org, 234980@bugs.debian.org, 331035@bugs.debian.org, 349978@bugs.debian.org, 99254@bugs.debian.org, 337885@bugs.debian.org, 331729@bugs.debian.org, 130918@bugs.debian.org, 298061@bugs.debian.org, 153671@bugs.debian.org, 338294@bugs.debian.org, control@bugs.debian.org, php5@packages.debian.org
Subject: Reassigning bugs from php4 to php5
Date: Sun, 13 Jul 2008 23:08:08 +0100
reassign 397451 php5
reassign 147107 php5
reassign 418598 php5
reassign 411112 php5
reassign 311267 php5
reassign 292125 php5
reassign 338086 php5
reassign 159220 php5
reassign 305302 php5
reassign 361789 php5
reassign 299773 php5
reassign 263939 php5
reassign 340642 php5
reassign 215727 php5
reassign 336548 php5
reassign 225845 php5
reassign 151498 php5
reassign 307479 php5
reassign 424937 php5
reassign 311773 php5
reassign 329548 php5
reassign 423427 php5
reassign 381874 php5
reassign 429982 php5
reassign 399259 php5
reassign 375918 php5
reassign 346145 php5
reassign 297866 php5
reassign 379243 php5
reassign 308050 php5
reassign 269471 php5
reassign 424340 php5
reassign 401065 php5
reassign 173683 php5
reassign 364310 php5
reassign 396734 php5
reassign 394644 php5
reassign 286325 php5
reassign 295388 php5
reassign 308793 php5
reassign 183726 php5
reassign 248288 php5
reassign 346176 php5
reassign 147626 php5
reassign 239368 php5
reassign 302125 php5
reassign 349891 php5
reassign 166161 php5
reassign 419802 php5
reassign 329799 php5
reassign 183784 php5
reassign 135543 php5
reassign 341864 php5
reassign 110368 php5
reassign 197987 php5
reassign 152216 php5
reassign 234980 php5
reassign 331035 php5
reassign 349978 php5
reassign 99254 php5
reassign 337885 php5
reassign 331729 php5
reassign 130918 php5
reassign 298061 php5
reassign 153671 php5
reassign 338294 php5
thanks

The php4 package has been removed from Debian testing, unstable and
experimental. I am reassigning its bugs to the php5 package. Please
have a look at them, and close them if they don't apply to
php5 anymore.

Don't hesitate to reply to this mail if you have any question.

--
Marco Rodrigues
http://Marco.Tondela.org




Bug reassigned from package `php4-gd' to `php5'. Request was from Marco Rodrigues <gothicx@sapo.pt> to control@bugs.debian.org. (Sun, 13 Jul 2008 22:36:59 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#298061; Package php5. (full text, mbox, link).


Acknowledgement sent to sean finney <seanius@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (full text, mbox, link).


Message #89 received at 298061@bugs.debian.org (full text, mbox, reply):

From: sean finney <seanius@debian.org>
To: pkg-php-maint@lists.alioth.debian.org, Marco Rodrigues <gothicx@sapo.pt>, 331035@bugs.debian.org
Cc: 397451@bugs.debian.org, 147107@bugs.debian.org, 418598@bugs.debian.org, 411112@bugs.debian.org, 311267@bugs.debian.org, 292125@bugs.debian.org, 338086@bugs.debian.org, 159220@bugs.debian.org, 305302@bugs.debian.org, 361789@bugs.debian.org, 299773@bugs.debian.org, 263939@bugs.debian.org, 340642@bugs.debian.org, 215727@bugs.debian.org, 336548@bugs.debian.org, 225845@bugs.debian.org, 151498@bugs.debian.org, 307479@bugs.debian.org, 424937@bugs.debian.org, 311773@bugs.debian.org, 329548@bugs.debian.org, 423427@bugs.debian.org, 381874@bugs.debian.org, 429982@bugs.debian.org, 399259@bugs.debian.org, 375918@bugs.debian.org, 346145@bugs.debian.org, 297866@bugs.debian.org, 379243@bugs.debian.org, 308050@bugs.debian.org, 269471@bugs.debian.org, 424340@bugs.debian.org, 401065@bugs.debian.org, 173683@bugs.debian.org, 364310@bugs.debian.org, 396734@bugs.debian.org, 394644@bugs.debian.org, 286325@bugs.debian.org, 295388@bugs.debian.org, 308793@bugs.debian.org, 183726@bugs.debian.org, 248288@bugs.debian.org, 346176@bugs.debian.org, 147626@bugs.debian.org, 239368@bugs.debian.org, 302125@bugs.debian.org, 349891@bugs.debian.org, 166161@bugs.debian.org, 419802@bugs.debian.org, 329799@bugs.debian.org, 183784@bugs.debian.org, 135543@bugs.debian.org, 341864@bugs.debian.org, 110368@bugs.debian.org, 197987@bugs.debian.org, 152216@bugs.debian.org, 234980@bugs.debian.org, 349978@bugs.debian.org, 99254@bugs.debian.org, 337885@bugs.debian.org, 331729@bugs.debian.org, 130918@bugs.debian.org, 298061@bugs.debian.org, 153671@bugs.debian.org, 338294@bugs.debian.org, control@bugs.debian.org, php5@packages.debian.org
Subject: Re: [php-maint] Bug#331035: Reassigning bugs from php4 to php5
Date: Mon, 14 Jul 2008 08:44:02 +0200
[Message part 1 (text/plain, inline)]
close 397451
close 147107
close 418598
close 411112
close 311267
close 292125
close 338086
close 159220
close 305302
close 361789
close 299773
close 263939
close 340642
close 215727
close 336548
close 225845
close 151498
close 307479
close 424937
close 311773
close 329548
close 423427
close 381874
close 429982
close 399259
close 375918
close 346145
close 297866
close 379243
close 308050
close 269471
close 424340
close 401065
close 173683
close 364310
close 396734
close 394644
close 286325
close 295388
close 308793
close 183726
close 248288
close 346176
close 147626
close 239368
close 302125
close 349891
close 166161
close 419802
close 329799
close 183784
close 135543
close 341864
close 110368
close 197987
close 152216
close 234980
close 331035
close 349978
close 99254
close 337885
close 331729
close 130918
close 298061
close 153671
close 338294
thanks

hi marco,

On Monday 14 July 2008 12:08:08 am Marco Rodrigues wrote:
<snip>
> reassign 338294 php5
> thanks
>
> The php4 package has been removed from Debian testing, unstable and
> experimental. I am closeing its bugs to the package. Please
> have a look at them, and close them if they don't apply to
> anymore.

what you have done does not help.  it moves a bunch of bugs in various states 
reported against various binary packages to a single source package.  this 
makes our jobs much harder.  also, iirc many of these bugs were in fact 
php4-specific.

as php5 and friends are already overloaded with their own bugs, i am heavy 
handedly closing these reports.  please have a look at them, and reopen them 
if they still apply.


	sean
[signature.asc (application/pgp-signature, inline)]

Bug closed, send any further explanations to Reine Johansson <brain@bredband.net> Request was from sean finney <seanius@debian.org> to control@bugs.debian.org. (Mon, 14 Jul 2008 06:46:37 GMT) (full text, mbox, link).


Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 11 Aug 2008 08:36:32 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jul 2 00:19:34 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.