0

I am trying to make a gamecard for a RSPS. This is my first time using PHP to generate text on images and when trying to apply this weird glitch happens:

But, when the original photo looks like this:

As you can see the corners are not curved like they should be. But, in the original it comes out fine. I am not talking about the location of the numbers. Here is the code I am using:

<?php
header('Content-Type: image/png');

// Image Creation
$image_file = "SoulSplitCard.png";
$im = imagecreatefrompng($image_file);

//Colors
$white = imagecolorallocate($im, 255, 255, 255);
$grey = imagecolorallocate($im, 128, 128, 128);
$black = imagecolorallocate($im, 0, 0, 0);
$rscol = imagecolorallocate($im, 23, 113, 183);


// Levels (for now)
$text = '99';
$text2 = '87';
// Font
$font = 'arial.ttf';

//Text Applications
imagettftext($im, 15, 0, 150, 35, $rscol, $font, $text);
imagettftext($im, 15, 0, 150, 81, $rscol, $font, $text2);

// Using imagepng() instead of imagejpeg()
imagepng($im);
imagedestroy($im);
?>

What is causing this to happen?

Antony
  • 14,900
  • 10
  • 46
  • 74
NomadsBoy
  • 13
  • 2

0 Answers0