Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议提供使用 imagestring来画字符选项 #10

Open
wadelau opened this issue Feb 10, 2022 · 1 comment
Open

建议提供使用 imagestring来画字符选项 #10

wadelau opened this issue Feb 10, 2022 · 1 comment

Comments

@wadelau
Copy link

wadelau commented Feb 10, 2022

https://ufqi.com/blog/low-cost-and-high-relia-verify-code-program/#comment-399

用PHP内置 imagestring 取代了 imagettftext函数,后者需要gd库更多的支持,而 imagestring 默认配置已经内置了。
//- remedy by xenxin@ufqi, Thu Feb 10 05:03:06 UTC 2022
imagestring(
self::$image,
self::$fontSize*(rand(1,5)),
$codeNX,
self::$fontSize * 3/2 - rand(0, self::$fontSize*2),
self::$code[$i],
self::color(30, 120) // 验证码文字颜色
);

@stevenjoezhang
Copy link
Owner

stevenjoezhang commented Feb 10, 2022

收到,我测试一下看看。imagestring 不能旋转文字,可能还需要 imagerotate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants