Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
icret committed Jan 20, 2024
1 parent fe237dd commit 40918df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions app/captcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@

/*字体文件位置*/
$fontfile = APP_ROOT . $config['textFont'];
/* floor() 修复php>8.0精度丢失 v2.8.4 */
for ($i = 0; $i < $count; $i++) {
$font_color = imagecolorallocate($img, mt_rand(0, 100), mt_rand(0, 50), mt_rand(0, 255));
imagettftext(
$img,
$font_size,
mt_rand(0, 20) - mt_rand(0, 25),
($img_w * $i / 4) + mt_rand(0, 15),
mt_rand($img_h / 2, $img_h),
floor(mt_rand(0, 20) - mt_rand(0, 25)),
floor($img_w * $i / 4) + floor(mt_rand(0, 15)),
floor(mt_rand($img_h / 2, $img_h)),
$font_color,
realpath($fontfile),
$code[$i]
Expand Down
3 changes: 2 additions & 1 deletion docs/update.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
* 2024-01-20 v2.8.4
- Fix [#163](https://github.com/icret/EasyImages2.0/pull/163)
- 增加检测FTP
- Fix [#159](https://github.com/icret/EasyImages2.0/pull/159)
- 增加上传至FTP
- 增加自定义时区
- 增加大文件分片上传
- 增加重置OPcache缓存
Expand Down

0 comments on commit 40918df

Please sign in to comment.