GD blurry text with imagettftext in php

I am making online virtual "name tags" for my coworkers.   I am using php/mysql with GD to put their names on a  name tag image.   I have been getting complaints that the text on the badges is blurry especially at lower resolutions (I didnt notice because I'm half blind and at 1280x1024)  the ONLY solution I've seen is to put the text on an image of 2x the size and reduce it.   This seems like a clever solution, but not something I want to do unless I have to.    If it IS the only solution I would appreciate some advice on simple formulas to change how my text is positioned so that It will work on the doubled image.

I am using the gd with php and the version is        bundled (2.0.23 compatible)

LVL 1
hibbidijiAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Diablo84Connect With a Mentor Commented:
actually the vast majority of email clients do support png's, off the top of my head i know outlook and mozilla thunderbird do, in addition to this i know hotmail does.

If png is definitely not an option then i think creating the picture double size and then halfing it may be the only option, unless i can think of another way of working around it...
0
 
Diablo84Commented:
I had a similar problem before when using imagejpeg() after using imagettftext, i tried using imagepng() instead and had better output so this might be worth trying for you if the option is available.

http://www.php.net/manual/en/function.imagepng.php
0
 
hibbidijiAuthor Commented:
The question would be this:  If I send a JPEG header then send a PNG image isnt this a problem?   Wouldnt there potentially be cross browser potential incompatibilities?
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Diablo84Commented:
>> If I send a JPEG header then send a PNG image isnt this a problem?   Wouldnt there potentially be cross browser potential incompatibilities?

having never tried this before i can not give you a definative answer.

can you not output the image as a png or does it have to be in jpg format?
0
 
hibbidijiAuthor Commented:
I really need to output as JPEG because these images are being delivered to the workers via email and most of their email clients will probably only read jpegs
0
 
hibbidijiAuthor Commented:
I've got a few messages into the GD mailing list.   There is a new version out.  While I know that the PHP version of GD is different, I'm going to see if the latest version will do me any good.
0
 
hibbidijiAuthor Commented:
I am going with the 2x solution. There really isnt another one that will work properly for my purposes.  thankyou!
0
 
Diablo84Commented:
quite alright, sorry i couldnt help you more on this one.

good luck,

|)iablo
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.