PHPackages                             laofu110/poster - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. laofu110/poster

ActiveLibrary

laofu110/poster
===============

php生成海报工具

1.01(5y ago)5592Apache-2.0PHPPHP &gt;=5.5.0

Since Aug 31Pushed 5y ago1 watchersCompare

[ Source](https://github.com/laofu110/phpPoster)[ Packagist](https://packagist.org/packages/laofu110/poster)[ RSS](/packages/laofu110-poster/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)DependenciesVersions (2)Used By (0)

安装
==

[](#安装)

```
composer require laofu110/poster

```

使用方法
====

[](#使用方法)

```
$config =[
    'bg' => '',//背景图片路径
    'format'=>'jpg',//支持jpg、png、gif
    'quality'=>75,//压缩质量（0-100），输出格式为jpg时比较明显
    'text' => [
        [
            'text' => '',
            'left' => 242,
            'top' => 466,
            'fontSize' =>28,
            'fontColor' => '68,68,68',
            'angle' => 0,//旋转角度
        ],
    ],
    'image' =>[
        [
            'url' => '',//支持图片数据流、网络地址、本地路径
            'left' => 110,
            'top' => 420,
            'width' => 110,
            'height' => 110,
            'radius' => 50,
            'opacity' => 100,
        ],
    ]
];
$Poster=new \Laofu\Image\Poster($config);
$img=$Poster->make($filename);//当$filename=''时，会返回图片数据流，可以结合response直接输出到浏览器
if(!$img){
    $err=$Poster->errMsg;
}

```

> 当图片类型为网络地址时，如果图片下载需要用到referer以及其他参数时，可以在图片参数里添加header参数

说明
==

[](#说明)

- 画布大小等于背景图片大小，暂不支持使用空背景参数定义画布
- 实际上画布bg的参数除了支持直接给定一个字符串图片以外，也可以给一个数组参数，里面也可以包含timeout跟header选项
- 本项目基于 [jiankeluoluo/php\_poster](https://github.com/jiankeluoluo/php_poster) 二次封装，因为引入了网络图片下载功能，为了防止内存溢出，去掉了static方法

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2081d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7a1bc217ca21856010bf2cd19f704d7001451850b71827bf26beff123a72a51b?d=identicon)[laofu110](/maintainers/laofu110)

### Embed Badge

![Health badge](/badges/laofu110-poster/health.svg)

```
[![Health](https://phpackages.com/badges/laofu110-poster/health.svg)](https://phpackages.com/packages/laofu110-poster)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
