<?php
bool imageantialias ( GdImage $image, bool $enable )
where,
$image = The image identifier
$enable = To stablish if antialias will be used or not
?>
<?php
echo 'PHP VERSION: ' . PHP_VERSION . '<br><br>';
$lang = 'en';
$sup_img = 'png/baseXx.png';
$res1_img = 'png/PNG 054 01 baseXx-alias.png';
$res2_img = 'png/PNG 054 01 baseXx-antialias.png';
$id_sup_img = imagecreatefrompng($sup_img);
$en = 'Existing Image' ;
echo $sup_img . '<br><br>' . $$lang; ?>
<br><br><img src="<?php echo
$sup_img; ?>" alt="<?php echo $sup_img; ?>"><br><br>
<?php
$x10 = 30;
$y10 = 30;
$x1N = 340;
$y1N = 250;
$ln1_red = 0;
$ln1_green = 0;
$ln1_blue = 255;
$ln1_color = imagecolorallocate($id_sup_img,
$ln1_red,
$ln1_green,
$ln1_blue);
$x20 = 340;
$y20 = 50;
$x2N = 100;
$y2N = 250;
$ln2_red = 255;
$ln2_green = 0;
$ln2_blue = 0;
$ln2_color = imagecolorallocate($id_sup_img,
$ln2_red,
$ln2_green,
$ln2_blue);
$ln1 = imageline($id_sup_img,
$x10, $y10,
$x1N, $y1N, $ln1_color);
$ln2 = imageline($id_sup_img,
$x20, $y20,
$x2N, $y2N, $ln2_color);
imagepng($id_sup_img, $res1_img);
imageantialias($id_sup_img, TRUE);
$ln1 = imageline($id_sup_img,
$x10, $y10,
$x1N, $y1N, $ln1_color);
$ln2 = imageline($id_sup_img,
$x20, $y20,
$x2N, $y2N, $ln2_color);
imagepng($id_sup_img, $res2_img);
?>
<br>
<?php echo $res1_img; ?><br><br>
<img src="<?php echo $res1_img; ?>"
alt="<?php echo $res1_img; ?>"><br><br><br>
<?php
echo $res2_img; ?>
<br><br><img src="<?php echo
$res2_img; ?>" alt="<?php echo $res2_img; ?>"><br>