Changeset 3010 for trunk/system/libraries/Captcha.php
- Timestamp:
- 07/08/2008 04:09:39 PM (3 months ago)
- Files:
-
- 1 modified
-
trunk/system/libraries/Captcha.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/libraries/Captcha.php
r2652 r3010 255 255 { 256 256 $text_color = imageColorAllocate($this->image, mt_rand($color_limit + 8, 255), mt_rand($color_limit + 8, 255), mt_rand($color_limit + 8, 255)); 257 $char = substr($chars, mt_rand(0, 15), 1);258 imageTTFtext($this->image, mt_rand(23, 27), mt_rand(160, 200), mt_rand(-10, $this->width +10), mt_rand(-10, 60), $text_color, $font, $char);257 $char = substr($chars, mt_rand(0, 15), 1); 258 imageTTFtext($this->image, mt_rand(23, 27), mt_rand(160, 200), mt_rand(-10, $this->width + 10), mt_rand(-10, 60), $text_color, $font, $char); 259 259 } 260 260 … … 353 353 for ($i = 0; $i <= $width; $i++) 354 354 { 355 $red = $left_color[0] - floor($i*$color0);356 $green = $left_color[1] - floor($i*$color1);357 $blue = $left_color[2] - floor($i*$color2);355 $red = $left_color[0] - floor($i * $color0); 356 $green = $left_color[1] - floor($i * $color1); 357 $blue = $left_color[2] - floor($i * $color2); 358 358 $col = imagecolorallocate($this->image, $red, $green, $blue); 359 359
