|
Posted by comp.lang.php on 06/20/07 14:32
On Jun 20, 10:02 am, Rik <luiheidsgoe...@hotmail.com> wrote:
> On Wed, 20 Jun 2007 15:45:03 +0200, comp.lang.php
>
>
>
>
>
> <phillip.s.pow...@gmail.com> wrote:
> > Recap:
>
> > Using imagerotate within PHP 4.3.9 - PHP 5.2.0 for both XP and Linux,
> > all using GD2
>
> > If you rotate an image 180 degrees, all is fine
>
> > If you rotate an image > 0 degrees and < 180 degrees, or > 180 degrees
> > and < 360 degrees, while the image will rotate, its dimensions are
> > somehow not refactored and as a result you get a rather annoying black
> > bar in the newly-rotated image, along with part of your image being
> > cropped off.
>
> > I learned about a possible workaround with ImageMagick's convert
> > command, but has anyone found a better solution (other than using XP's
> > built-in image rotation routines)?
>
> Depends on what you want from it, how would you like it to behave on
> arbitrary angle? Calculate the width & height needed for the new image,
> create that, set the backgroundcolor of your choice on it, and paste the
> image in it & rotate.
I did that after imagerotate misbehaved the first time, however, it
seems as if imagerotate ignored the newly-calculated height and weight
options.
Say for instance you have an image of 300 x 150. If you rotate 90
degrees the image should be 150 x 300 with the image contents
perfectly rotated. Instead you have an image of 150 x 300 with a big
black bar on the right. This in spite of recalculating the correct
height and width for the new image.
>
> --
> Rik Wasmus- Hide quoted text -
>
> - Show quoted text -
Navigation:
[Reply to this message]
|