On Tue, 19 Apr 2005 13:27:39 +0200
Jonas Smedegaard <[EMAIL PROTECTED]> 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


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to