使用php生成图片,如何将文字放置到图片的中心?

WBOY
Release: 2016-06-06 20:31:43
Original
1460 people have browsed it

做了一个占位符(http://bitmap.uedsc.com/)的网页项目,需要将文字放置到图片的中心,如何计算文字的宽度和高度,或者根据特定的字体计算这个值?

回复内容:

做了一个占位符(http://bitmap.uedsc.com/)的网页项目,需要将文字放置到图片的中心,如何计算文字的宽度和高度,或者根据特定的字体计算这个值?

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template