imagettftext resulting in blurry text

It’s been a while since I used PHP and I’m finally doing something with it again. I’m working on creating dynamic forum signatures and of course need to use some text in that. I’m using the imagettftext() method to create my text using the Arial font. I was getting strange blurred result and reading the documentation suggested I should turn the anti-aliassing off. It turn out that the GDLib JPG compression is pretty bad and caused all the blurring. When I switched to PNG all blurryness was gone.

Solution: Make sure you use PNG, not JPEG.

Leave a Reply

Your email address will not be published. Required fields are marked *