Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jul 2007
    Posts
    135
    Thanks
    1
    Thanked 0 Times in 0 Posts

    GD Library - Anti Aliasing?

    And, is there any way I can get this text to anti-alias??? I'm adding it to a pre-existing image.

    Code:
    <?php
            header ("Content-type: image/gif");
            $img_handle = @imagecreatefromgif('default.gif') or die ("Cannot Load Image");
            imageantialias ($img_handle, $on);  
            $txt_color = imagecolorclosest ($img_handle, 0, 0, 0);
            imagettftext($img_handle, 12, 0, 200 , 115, $txt_color, "tahoma.ttf", "TAHHHHOMAAA $on");
            Imagegif ($img_handle);
    ?>
    Last edited by iceflyin; 08-12-2007 at 07:12 AM.

  • #2
    Senior Coder
    Join Date
    Mar 2003
    Location
    Atlanta
    Posts
    1,037
    Thanks
    14
    Thanked 30 Times in 28 Posts
    Have you tried the comments section of the imageantialias function?
    http://www.php.net/imageantialias

    Perhaps you can create your string as a picture (probably imagestring()) and overlay that over your default.gif.
    Most of my questions/posts are fairly straightforward and simple. I post long verbose messages in an attempt to be thorough.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •