php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #47947 Documentation error for imagerotate()
Submitted: 2009-04-10 20:34 UTC Modified: 2009-04-21 01:20 UTC
From: jonatan dot olofsson at gmail dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
 [2009-04-10 20:34 UTC] jonatan dot olofsson at gmail dot com
Description:
------------
Quote from manual for imagerotate(): "and the rotated image is scaled down so that the whole rotated image fits in the destination image"

The rotated image is in fact not scaled down, but the function returns an image with dimensions to fit the image (also, the reference to a destination image seems out of place, since no destination image is specified)

Reproduce code:
---------------
$wrk = imagecreatetruecolor(100,100);
$wrk = imagerotate($wrk, 45, -1);
var_dump(imagesx($wrk), imagesy($wrk));

Expected result:
----------------
int(100) int(100) 

Actual result:
--------------
int(142) int(142) 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-21 01:20 UTC] fa@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 18:00:01 2026 UTC