Professional Web Applications Themes

#25926 [Opn->Bgs]: ImageTTFText and ImageTTFBox don't work and return wierd values - PHP Development

ID: 25926 Updated by: [email]sniperphp.net[/email] Reported By: olga at bluebytes dot com -Status: Open +Status: Bogus Bug Type: GD related Operating System: Linux PHP Version: 4.3.3 New Comment: Using latest STABLE CVS snapshot with bundled GD library works just fine. Previous Comments: ------------------------------------------------------------------------ [2003-10-20 15:50:41] olga at bluebytes dot com Description: ------------ ImageTTFText doesn't output any characters. If there's anything else in the image, the rest will be fine; if the text string is the only thing, the image will be blank. Trying to figure out what's wrong, I took a look at the return values from ImageTTFText as well ...

  1. #1

    Default #25926 [Opn->Bgs]: ImageTTFText and ImageTTFBox don't work and return wierd values

    ID: 25926
    Updated by: [email]sniperphp.net[/email]
    Reported By: olga at bluebytes dot com
    -Status: Open
    +Status: Bogus
    Bug Type: GD related
    Operating System: Linux
    PHP Version: 4.3.3
    New Comment:

    Using latest STABLE CVS snapshot with bundled GD library works just
    fine.



    Previous Comments:
    ------------------------------------------------------------------------

    [2003-10-20 15:50:41] olga at bluebytes dot com

    Description:
    ------------
    ImageTTFText doesn't output any characters. If there's anything else in
    the image, the rest will be fine; if the text string is the only thing,
    the image will be blank.
    Trying to figure out what's wrong, I took a look at the return values
    from ImageTTFText as well as ImageTTFBox. They both produce huge
    values, i.e. Array ( [0] => 138323388 [1] => 11 [2] => -1073754136 [3]
    => 1076636124 [4] => 138611764 [5] => 138323484 [6] => 11 [7] => 0 )

    The values DO NOT depend on the font used. Furthermore, they are
    different each time I load the page for the SAME font
    ([url]http://blunoise.com/imagetext.php[/url] shows values for "Hello world" in
    arial).

    Reproduce code:
    ---------------
    <?php
    //header("Content-type: image/jpeg");
    error_reporting('E_ALL');
    $im = imagecreate(400,30);
    $white = imagecolorallocate($im, 255,255,255);
    $black = imagecolorallocate($im, 0,0,0);

    // Replace path by your own font path
    $result = imagettftext($im, 12, 0, 6, 20, $black,
    "/home/blunoise/fonts/arial.ttf", "Hello world");
    $bbox=imagettfbbox (12, 0, "/home/blunoise/fonts/arial.ttf", "Hello
    world");
    print_r($bbox);

    //imagepng($im);
    imagedestroy($im);
    ?>


    Expected result:
    ----------------
    A jpeg saying "Hello world"



    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=25926&edit=1[/url]
    sniper@php.net Guest

  2. #2

    Default #25926 [Opn->Bgs]: ImageTTFText and ImageTTFBox don't work and return wierd values

    ID: 25926
    Updated by: [email]sniperphp.net[/email]
    Reported By: olga at bluebytes dot com
    -Status: Open
    +Status: Bogus
    Bug Type: GD related
    Operating System: Linux
    PHP Version: 4.3.3
    New Comment:

    Works fine for me. Update your freetype2 lib, get proper fonts, working
    script, etc. and it will work for you too.



    Previous Comments:
    ------------------------------------------------------------------------

    [2003-10-24 18:07:05] vygen at planwerk6 dot de

    I had the same strange problem with the built in gd support.

    As i tried to compile against my installed gd 1.8.4 (suse 7.2 gd.rpm
    and gd-devel.rpm) with --with-gd=/usr everything worked fine again.

    ------------------------------------------------------------------------

    [2003-10-22 09:56:11] olga at bluebytes dot com

    './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml'
    '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--with-gd'
    '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr'
    '--with-xpm-dir=/usr/X11R6' '--with-ming=../ming-0.2a'
    '--enable-magic-quotes' '--with-mysql' '--with-pear' '--enable-sockets'
    '--enable-track-vars' '--enable-versioning' '--with-zlib' '--with-ttf'
    '--with-freetype' '--enable-gd-native-ttf' '--enable-exif'

    I am assuming --wtih-gd uses bundled version. Sorry if I am incorrect.

    ------------------------------------------------------------------------

    [2003-10-22 01:47:36] [email]sniperphp.net[/email]

    What was the configure line you used to configure PHP?
    If you didn't use the _bundled_ GD library, close this.


    ------------------------------------------------------------------------

    [2003-10-21 17:33:04] olga at bluebytes dot com

    Actually, I just installed PHP Version 4.3.4RC3-dev which is marked as
    stable on snaps.php.net, and it's still not working.

    ------------------------------------------------------------------------

    [2003-10-21 15:38:47] [email]sniperphp.net[/email]

    Using latest STABLE CVS snapshot with bundled GD library works just
    fine.


    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    [url]http://bugs.php.net/25926[/url]

    --
    Edit this bug report at [url]http://bugs.php.net/?id=25926&edit=1[/url]
    sniper@php.net Guest

Similar Threads

  1. #25926 [Bgs->Opn]: ImageTTFText and ImageTTFBox don't work and return weird values
    By olga at bluebytes dot com in forum PHP Development
    Replies: 0
    Last Post: October 31st, 02:01 AM
  2. #25926 [Fbk->Opn]: ImageTTFText and ImageTTFBox don't work and return wierd values
    By olga at bluebytes dot com in forum PHP Development
    Replies: 0
    Last Post: October 22nd, 01:56 PM
  3. Replies: 0
    Last Post: October 22nd, 05:48 AM
  4. #25926 [Bgs->Opn]: ImageTTFText and ImageTTFBox don't work and return wierd values
    By olga at bluebytes dot com in forum PHP Development
    Replies: 0
    Last Post: October 21st, 09:33 PM
  5. #25926 [NEW]: ImageTTFText and ImageTTFBox don't work and return wierd values
    By olga at bluebytes dot com in forum PHP Development
    Replies: 0
    Last Post: October 20th, 07:51 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139