473,721 Members | 2,259 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

imagettftext problem with angle

Hello !

Here is my problem :

I had some php scripts which worked well with php 4.0.5 (GD 1.6.2
according to phpinfo() ) and i put them on a new server with php 4.4.2
(and GD 2.0.28). Now, they don't do what they should :

i'm generating an image with text written with an angle : imagettftext
used

on the new server, the text has the good angle, but letters inside the
text are rotated with double this angle : for instance, with an angle
of 90 degrees, the text is written bottom to top (like it should), but
letters are rotated with a 180° angle
i'm sorry if it's something known / corrected already, but I haven't
found anything about this yet

In the worst case, i'll probably do my own function to write the text
letter by letter, but i prefered posting here before

Thanks

PS : btw, it seems imagettfbbox gives the rectangle that would be used
on a rotated text without this problem, so it may come from
imagettftext

Feb 1 '07 #1
3 2883
"Doraj" <do****@gmail.c omwrote in message
news:11******** *************@v 45g2000cwv.goog legroups.com...
Hello !
>
Here is my problem :

I had some php scripts which worked well with php 4.0.5 (GD 1.6.2
according to phpinfo() ) and i put them on a new server with php 4.4.2
(and GD 2.0.28). Now, they don't do what they should :

i'm generating an image with text written with an angle : imagettftext
used

on the new server, the text has the good angle, but letters inside the
text are rotated with double this angle : for instance, with an angle
of 90 degrees, the text is written bottom to top (like it should), but
letters are rotated with a 180° angle
i'm sorry if it's something known / corrected already, but I haven't
found anything about this yet
It seems that this bug: http://bugs.php.net/bug.php?id=25398

--
"Ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" - lpk
http://outolempi.net/ahdistus/ - Satunnaisesti päivittyvä nettisarjis
sp**@outolempi. net | rot13(xv***@bhg byrzcv.arg)

Feb 1 '07 #2
i'm sorry if it's something known / corrected already, but I haven't
found anything about this yet

It seems that this bug: http://bugs.php.net/bug.php?id=25398
indeed, seems like it, thanks a lot

Feb 1 '07 #3
On Thu, 01 Feb 2007 05:52:29 -0800, Doraj <do****@gmail.c omwrote:
>
i'm sorry if it's something known / corrected already, but I haven't
found anything about this yet

It seems that this bug: http://bugs.php.net/bug.php?id=25398

indeed, seems like it, thanks a lot
Does imagefttext (FreeType 2) have the same problem? If your server's
installation supports this function, give it a try. :-)

Good luck

--
Curtis, http://dyersweb.com
Feb 3 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
9149
by: bof | last post by:
I'm attempting to use ImageTTFText to render text to an image, I can get it to work if I a) specify the full font path b) switch off anti-aliasing c) specify an OpenType font (e.g. arial.ttf) If I specify a TrueType font (e.g. futura.ttf) I get an error message "Warning: imagettftext(): Could not find/open font in c:\filepath"
0
2141
by: John Wellesz | last post by:
Hi, since I've upgraded to php 4.3.4 (before I used 4.1.2) I have a problem with imagettftext(): when executing the line: imagettftext($im, 20, 0, 10, 25, $white, "$script_dir/verdana.ttf", "Test en cours... Oméga: Ω");
3
4413
by: Leif Wessman | last post by:
From: http://www.php.net/manual/en/function.imagettftext.php "color is the color index. Using the negative of a color index has the effect of turning off antialiasing." I'm using a bundled version of GD: 2.0.23 compatible. When using the function imagettftext() with a negative color to get a aliased text as stated in the docs the text gets grainy. Not antialised, and not aliased. Something in between (ugly!). I've tried several fonts....
1
4244
by: Axier | last post by:
I cannot get the swedish character set on images. What can be wrong? I would very much appreciate help. regards, axier I can supply some code here and a link: http://www.mymobile.nu/services/fontgen/fonttest.php Some people looks like they can get it to work with no effort at all with the same script.
0
1933
by: ljb | last post by:
Using PHP-4.3.11 with GD extension, bundled GD library, and freetype-2.1.9 (with X.org 6.8.1). I can't get the TrueType Font (TTF) bounding box to come out right. Whether using imagettftext() or imagettfbbox(), for some angles of text (like 45 degrees), the box comes back in the wrong place. Sample code below; just change the $font assignment to point to a TTF font file. You should see a text string with a box around it, but my box isn't...
2
2916
by: Gordan | last post by:
Im using imagettftext to write some text on my image. I'm on Win XP and using the plain arial.ttf font that I copied from win dir my typical line would be imagettftext($im, 33, 0, 20, 500, $black, 'arial.ttf', $text); everything is perfect except the tab "\t" sign if I set $text = "something\tsomething" the tab gets displayed but it also displays some rectangle like "this char is in wrong encoding" or something like that. Basically I...
1
10496
by: franscescomoi | last post by:
Hi. On PHP 4.3.10 on Linux I try to: ------ $im = imagecreate(400, 30); $black = imagecolorallocate($im, 0, 0, 0); imagettftext($image, 20, -3, 10, 20, $black, 'Arial.ttf', 'Test'); ------- But I get this error message:
1
1836
by: Jean-Francois Brault | last post by:
I wrote a crappy class for radian angle management. The class consists of an array of radian values. I put all these things in a class in which all methods are static, so I can access it anywhere in my code (I could have made a library instead of a class). I can't find out why g++ compiles fine, but does not link correctly the following code. Here, I am posting my full code, .h and .cpp just to make all things clear. The linker output...
6
2533
by: monomaniac21 | last post by:
My url is www.aptitudehack.com Hi i cant get an image to display on another server though it does on mine. Here is the code for the page. The problem i think is the imagettftext function particularly the reference to my font file "Verdana". If i use a different function to write text it does so no bother but unfortunately i need this function to work. Here is the error it outputs followed by the code for the page in question:
0
8840
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8730
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9064
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8007
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6669
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5981
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4484
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4753
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3189
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.