Problem with gdrotate

Issue #67 resolved
Remi Collet
created an issue

PHP test script

if (isset($_GET['angle'])) {
    $im = "/home/remi/Documents/remirh128.jpg";
    $source = imagecreatefromjpeg($im) or die('Error opening file '.$filename);
    $rotation = imagerotate($source, $_GET['angle'], 0);
    header('Content-type: image/jpeg');
} else {
    echo "<html><body><table><tr>";
    for ($ang=0 ; $ang<=180 ; $ang +=15) {
        printf("<td><img src='".$_SERVER['PHP_SELF']."?angle=$ang' /><br/>$ang</td>\n");
    echo "</tr></table></body></html>";

First image is using PHP 5.5.0RC2 (bundled libgd) or using system libgd (latest master)

Comments (20)

  1. Pierre Joye

    I can't reproduce using today's php-src (master and 5.5 branche). I fear you may be right about the compiler being a zealot. I tested on windows using vc11, can't try on linux before next week.

  2. Pierre Joye

    @remicollet Thanks! Good catch :)

    Should add a note about having to use signed integer with these fixed point arithmetic macros, to avoid this bug to come back to us soon ;)

  3. Log in to comment