Howdy... 😉

I have a quick question...

I have used ImageTTFText() function to generate dynamic signature and it did work, but somehow the text were all blurry and hard to read...

So, I was wondering what might be the problem that's caused it... I think this might be ahppening because I am using GD 1.6.2 on PHP 4.2.2... (This I'd love to upgrade, but I do not have any choice on this... The server can't do anything about this...) So, another thing I might be able to give some more push is how I have prepared TTF fonts... I am not sure if I did it right or not, but I just FTPed several common TTF files from my Windows/Fonts directory to the server... Did I do it right???

Here you can see the example of those graphics generated via ImageTTFText() function and ImageString() function...
http://forum.flashvacuum.com/viewtopic.php?p=1900#1900

Any help would be appreciated... 😉
Thank you very much...

    It's probably due to anti-aliasing. A common hack is to negate the colour (e.g. $fontcolor * -1).

      Thank you for the reply... 😉

      That did not do the job... The font itself look abit better than the previous one with * -1, but somehow it's looking weird... 🙁
      http://forum.flashvacuum.com/images/sig/signature.php

      This is the code that I have to create the image with the arial font...

      $fontType = "arial.ttf";  
      $fontType = realpath($fontType); $fontSize = 8; $tmpImage = imagecreatefromjpeg($signImage); $img = imagecreatefromjpeg($signImage); $bg_color = imagecolorallocate ($img, 255, 255, 255);//RGB values - Backgroundcolor of stats $text_color = imagecolorallocate ($img, 0, 0, 0);//RGB values - Textcolor stats $text_color = ($text_color * -1); imagefilledrectangle ($img, 0, 0, $width, $height, $bg_color); imagecopy ($img, $tmpImage, 0, 0, 0, 0, $width, $height); // Copy stats imagecolortransparent($img, $bg_color); // Set Background transparent $i = 0; while($i < count($output)){ imagettftext($img, $fontSize, 0, $left, $top + $spacing * $i, $text_color, $fontType, $output[$i]); $i++; } header("Content-Type: image/png"); imagepng($img); imagejpeg($img, $newImage, $compression); //Imagejpeg($img,'',100); ImageDestroy ($img);
        Write a Reply...