View Full Version : GD Imagen Text
I am making a page generated Web and I am making an image with GD. where the user to put the Background and in input box to put the text and color and when him of a the Submit button and paresca the created image. what I need is as I can put the color thus #FFFFFF and not in RGB.
Mhtml
02-13-2007, 03:40 PM
You need to do a base-10 to base-16 conversion.
aedrin
02-13-2007, 05:16 PM
To answer the question.
$r = 100;
$g = 50;
$b = 200;
$color = '#' . base_convert($r, 10, 16) . base_convert($g, 10, 16) . base_convert($b, 10, 16);
Mhtml
02-13-2007, 05:21 PM
Why does everyone always insist on spoon feeding these people? If they just blow in here and get given code they'll never learn.
Not to mention you should probably test for a range of 0-255 in that code.
rafiki
02-13-2007, 06:56 PM
Why does everyone always insist on spoon feeding these people? If they just blow in here and get given code they'll never learn.
Not to mention you should probably test for a range of 0-255 in that code.
after hinting he needs base convert he would probably just google it or go t anouther site
Mhtml
02-13-2007, 07:20 PM
Well that's the point. Learning basic research skills will speed up your development, you'll find your answers much faster than posting in a forum. If you have a vague understanding of something and need help refining your attempt to do something, or you can't find the information then you should post a question.
The information is out there, it's well indexed and catalogued, why should we be duplicating it here? It's illogical!
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.