Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Old 04-15-2006, 05:12 PM   #1 (permalink)
Contributing Member
 
Join Date: 12-14-05
Posts: 106
iTrader: 0 / 0%
Latest Blog:
None

gnznroses is on the right pathgnznroses is on the right path
making graphics with php - problem with text

i'm creating graphics on the fly using php, and when i use a transparent background and then print text to the graphic, it doesn't look right when viewed on a black background. the text is anti-aliased over a white background. hard to explain so i'll show ya:



looks fine there, but now look:
http://bashfreebieguide.com/temp/badgif.html

any way to fix this?
gnznroses is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-15-2006, 05:17 PM   #2 (permalink)
Possible Terrorist
 
kwvarga's Avatar
 
Join Date: 10-13-03
Location: Tuscaloosa, AL or Atlanta
Posts: 2,504
iTrader: 0 / 0%
kwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web pro
Send a message via AIM to kwvarga
Are you using code like this?
PHP Code:
$image imagecreatetruecolor(19236);
$trans_color imagecolorallocate($image25500);
$color imagecolorallocate($image255255255);
imagecolortransparent($image$trans_color);
imagettftext($image1001023$color"impact.ttf"" MENU ITEM");
imagegif($image"output.gif");
imagedestroy($image); 
__________________
http://www.kylevarga.com - My blog.
kwvarga is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-15-2006, 05:22 PM   #3 (permalink)
Contributing Member
 
Join Date: 12-14-05
Posts: 106
iTrader: 0 / 0%
Latest Blog:
None

gnznroses is on the right pathgnznroses is on the right path
yeah, pretty much:
Code:
$white = imagecolorallocate($mygraphic, 255, 255, 255); $black = imagecolorallocate($mygraphic, 0, 0, 0); $bgcolor = imagecolortransparent($mygraphic, $white); imagefilledrectangle($mygraphic, 0, 0, $width, $$height, $bgcolor); imagettftext($mygraphic, $textsize, 0, $curX, $curY, $curcolor, $font, $txt); imagegif($mygraphic, $username . ".gif"); imagedestroy($mygraphic);
gnznroses is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-15-2006, 05:26 PM   #4 (permalink)
Possible Terrorist
 
kwvarga's Avatar
 
Join Date: 10-13-03
Location: Tuscaloosa, AL or Atlanta
Posts: 2,504
iTrader: 0 / 0%
kwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web pro
Send a message via AIM to kwvarga
Not sure, I know its transparency is shaky at best,

should try routing through ImageMagick if you can
__________________
http://www.kylevarga.com - My blog.
kwvarga is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Problem - Making HUGE SPACE on one specific page sixty6 Coding Forum 4 05-09-2006 08:17 PM
PHP=> a text box and making breaks when needed.. HELP PLE Izzmo Coding Forum 5 07-16-2004 12:54 PM
Problem of making brandable portal Igor Salindrija Marketing Forum 1 05-17-2004 03:59 PM
Making Cell Phone Graphics Natasha Forum Lobby 7 03-24-2004 03:15 PM


Sponsor Links
Get exposure! Contextual Links V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 04:16 AM.
© Copyright 2008 V7 Inc
Powered by vBulletin
Copyright © 2000-2009 Jelsoft Enterprises Limited.


Search Engine Optimization by vBSEO 3.3.0 ©2009, Crawlability, Inc.