<?php
GdImage|false imagerotate ( GdImage $image,
float $angle,
int $background_color,
bool $ignore_transparent = false )
where,
$image = The image identifier
$angle = The rotation angle in degrees
$background_color = The color of the uncovered zone
after the rotation
$ignore_transparent = To control the transparent colors
This parameter is unused
?>
<?php
echo 'PHP VERSION: ' . PHP_VERSION . '<br><br>';
$tst_img = "gif/GIF 020 01.gif"; // 256 colors
$dst1_img = "gif/GIF 020 01(90 degrees).gif";
$dst2_img = "gif/GIF 020 01(10 degrees).gif";
$dst3_img = "gif/GIF 020 01(-10 degrees).gif";
echo $tst_img; ?>
<br><br><img src="<?php echo $tst_img; ?>"
alt="<?php echo $tst_img; ?>"><br><br><br><br>
<?php
$id_org = imagecreatefromgif( $tst_img);
$ang_r1 = 90;
$ang_r2 = 10;
$ang_r3 = -10;
$bkg_2 = 0xeeeeee;
// background color
$bkg_3 = 0xeeeeee;
// background color
$trn = 100;
// this parameter is unused
$id_dst1 = imagerotate($id_org, $ang_r1, NULL, $trn );
imagegif ($id_dst1, $dst1_img);
$id_dst2 = imagerotate($id_org, $ang_r2, $bkg_2, $trn );
imagegif ($id_dst2, $dst2_img);
$id_dst3 = imagerotate($id_org, $ang_r3, $bkg_3, $trn );
imagegif ($id_dst3, $dst3_img);
echo $dst1_img; ?>
<br><br><img src="<?php echo
$dst1_img; ?>" alt="<?php echo $dst1_img; ?>"><br><br>
<?php echo $dst2_img; ?>
<br><br><img src="<?php echo
$dst2_img; ?>" alt="<?php echo $dst2_img; ?>"><br><br>
<?php echo $dst3_img; ?>
<br><br><img src="<?php echo
$dst3_img; ?>" alt="<?php echo $dst3_img; ?>"><br>
<?php
echo 'PHP VERSION: ' . PHP_VERSION . '<br><br>';
$tst_img = "jpeg/JPEG 025 01.jpg"; // TRUECOLOR
$dst1_img = "jpeg/JPEG 025 01(90 degrees).jpg";
$dst2_img = "jpeg/JPEG 025 01(10 degrees).jpg";
$dst3_img = "jpeg/JPEG 025 01(-10 degrees).jpg";
echo $tst_img; ?>
<br><br><img src="<?php echo $tst_img; ?>"
alt="<?php echo $tst_img; ?>" width="400"><br><br><br><br>
<?php
$id_org = imagecreatefromjpeg( $tst_img);
$ang_r1 = 90;
$ang_r2 = 10;
$ang_r3 = -10;
$bkg_2 = 0xeeeeee; // background color
$bkg_3 = 0xeeeeee; // background color
$trn = 0; // this parameter is unused
$id_dst1 = imagerotate($id_org, $ang_r1, NULL, $trn );
imagejpeg ($id_dst1, $dst1_img);
$id_dst2 = imagerotate($id_org, $ang_r2, $bkg_2, $trn );
imagejpeg ($id_dst2, $dst2_img);
$id_dst3 = imagerotate($id_org, $ang_r3, $bkg_3, $trn );
imagejpeg ($id_dst3, $dst3_img);
echo $dst1_img; ?>
<br><br><img src="<?php echo
$dst1_img; ?>" alt="<?php echo $dst1_img; ?>" width="400"><br><br>
<?php echo $dst2_img; ?>
<br><br><img src="<?php echo
$dst2_img; ?>" alt="<?php echo $dst2_img; ?>" width="400"><br><br>
<?php echo $dst3_img; ?>
<br><br><img src="<?php echo
$dst3_img; ?>" alt="<?php echo $dst3_img; ?>" width="400"><br>