|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-05-24 10:45 UTC] phpman at priya dot 2y dot net
I've tested this with both png's and gifs.... You can rotate at 90 degree angles but not at 45's or any other for that matter For the image I'm using, the script I'm using, and an example of it in action, please visit this url http://shancel.2y.net/wicons/wind2.php I used this command line to configure the build ./configure --with-mysql --with-apxs --prefix=/usr --with-gd --enable-gd-native-ttf --with-gettex/usr/include --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-freetype-dir=/usr/lib PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 22:00:01 2025 UTC |
I still wouldn't call this completely solved. I've managed to download and install the Jul 09, 2003 23:30 GMT snapshot. There is still the issue with the rotate function adding lines to the rotated image... AND below is a link to an 8 bit image rotate function that works to a point... Again the code is simply: $pic = imagecreatefrompng("pointer8bit.png"); $backcolor = imagecolorat($pic,1,1); $pic = imagerotate($pic,$_GET['r'],$backcolor); header('Content-type: image/png'); imagepng($pic); http://shancel.2y.net/wicons/wind2.php?r=45 - Works (1-45 works fine) http://shancel.2y.net/wicons/wind2.php?r=46 - Completely Black http://shancel.2y.net/wicons/wind2.php?r=90 - Completely Black http://shancel.2y.net/wicons/wind2.php?r=180 - Completely Black http://shancel.2y.net/wicons/wind2.php?r=316 - Works (316-360 works fine) Here is a link to my php info: http://shancel.2y.net/php.phpAlso, to further this, generated by the following code $base = imagecreatefrompng('windspeed.png'); $pic24bit = imagecreatefrompng("pointer.png"); $pic24bit = imagerotate($pic24bit,$rot[$_GET['r']],imagecolorat($pic24bit,1,1)); imagecopy($base,$pic24bit,(imagesx($base)-imagesx($pic24bit))/2,(imagesy($base)-imagesy($pic24bit))/2,1,1,imagesx($pic24bit),imagesy($pic24bit)); header('Content-type: image/jpeg'); imagejpeg($base); I get lines in the image that arn't there in the original. please see screenshot http://shancel.2y.net/wicons/phperrors.jpg where I've highlighted these errors with a blue line parallel to them.