×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Take out Random color of Captcha letters?

Take out Random color of Captcha letters? 15 years 10 months ago #1946

  • Patrick Toulze
  • Patrick Toulze's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 21
  • Thank you received: 0
I want to take out the random color of the Captcha letter
Iknow it have to do with:

$color = ImageColorAllocate($im, rand(0,0), rand(0,0), rand(0,0));
$rk_color = ImageColorAllocate($im, 128, 128, 128);

and

ImageTTFText($im, $size, $angle, $x + 2, $y + 2, $rk_color, $font, $textstr);
ImageTTFText($im, $size, $angle, $x, $y, $color, $font, $textstr);

in the captcha.php

But what to do to have the text image only one color....

Take out Random color of Captcha letters? 15 years 10 months ago #1948

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hm, as you can see in the demo:
compojoom.com/index.php/demo.html
the letters are always black, the background is different. You want to change the background or what?

Take out Random color of Captcha letters? 15 years 10 months ago #1965

  • Patrick Toulze
  • Patrick Toulze's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 21
  • Thank you received: 0
I already change the background image to better reflect the look and feel of the site.
If you go at:
http://www.animaleriemaxizoo.com/maxizoo/index.php?option=com_content&view=article&id=156%3Ablog-1&catid=83%3Ablog-oiseaux-articles&Itemid=95&lang=fr#JOSC_TOP
It seem that sometimes only the pale gray shadow appear but not the top black text.
Sometime it happen when you go to the page or if you click the code box enough time.
I really need to fix that....

Take out Random color of Captcha letters? 15 years 10 months ago #1997

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Did you fix your problem? For me the captcha seems fine.

Take out Random color of Captcha letters? 15 years 10 months ago #2019

  • Patrick Toulze
  • Patrick Toulze's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 21
  • Thank you received: 0
If you click the captcha enough time you will see it become pale gray at one point.

Take out Random color of Captcha letters? 15 years 10 months ago #2020

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
don't use rand(0,0)
just replace it with 0 to become black color.
$color = ImageColorAllocate($im, 0, 0, 0);
$rk_color = ImageColorAllocate($im, 128, 128, 128);

Take out Random color of Captcha letters? 15 years 10 months ago #2032

  • Patrick Toulze
  • Patrick Toulze's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 21
  • Thank you received: 0
Work perfectly!
Thank You!
;)
  • Page:
  • 1
Time to create page: 0.110 seconds