PHPackages                             9007967/postermaker - 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. [Image &amp; Media](/categories/media)
4. /
5. 9007967/postermaker

ActiveLibrary[Image &amp; Media](/categories/media)

9007967/postermaker
===================

A poster maker base on GD lib. 一个用php生成海报的神器。

0.1.5(6y ago)1347MITPHPPHP &gt;=5.6

Since Feb 24Pushed 5y agoCompare

[ Source](https://github.com/9007967/postermaker)[ Packagist](https://packagist.org/packages/9007967/postermaker)[ RSS](/packages/9007967-postermaker/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (5)Used By (0)

Postermaker 海报生成器
=================

[](#postermaker-海报生成器)

A poster make base on gd lib. (PHP) 一个用php生成海报的神器

Usage 用法
========

[](#usage-用法)

比如在文件someaction.php中使用：

```
$poster = new \PosterMaker\Postermaker(800, 1100);
$poster
    ->addImg('./bg.jpg', [0,0], [800, 1100])
    ->addImg('./data/upload/cover.jpg', [30,30],[740, 500])
    ->addImg('./data/upload/avatar.png', [520,620],[200, 200])
    ->addText('2020雅思口语刷题班', 30, [30,610], [255, 255, 255])
    ->addText('授课老师：Rico', 24, [30,720], [255, 255, 255])
    ->addText('coolhand', 24, [30,870], [255, 255, 255])
    ->addText('邀请你一起学习', 24, [30, 910], [255, 255, 255])
    ->addText('长按扫码听课', 24, [30,950], [255, 255, 255])
    ->addQrCode('http://com/123', [500,800],[250,250])
    ->render();

```

### 安装

[](#安装)

```
composer require moonwalkercui/postermaker:0.1.4

```

### addImg

[](#addimg)

按大小创建一个海报

```
$poster = new \PosterMaker\Postermaker(800, 1100); // (width, height)

```

### addImg

[](#addimg-1)

添加图片 (图片路径, \[x坐标, y坐标\], \[width, height\])

```
$poster->addImg('./data/upload/cover.jpg', [30,30],[740, 500])

```

### addText

[](#addtext)

添加图片 (文字内容, 字体大小, \[x坐标, y坐标\], 颜色\[R,G,B\])

```
$poster->addText('2020雅思口语刷题班', 30, [30,610], [255, 255, 255])

```

### addQrCode

[](#addqrcode)

添加二维码 (文字内容, \[x坐标, y坐标\], \[width, height\])

```
$poster->addQrCode('http://com/123', [500,800],[250,250])

```

### render

[](#render)

添加图片 (文字内容, 字体大小, \[x坐标, y坐标\], 颜色\[R,G,B\])

```
$poster->render('./save.png'); // 保持为图片
// or
$poster->render(); // show image in html: ``

```

Thinkphp等框架里中的使用
================

[](#thinkphp等框架里中的使用)

因为有些php框架的控制器默认输出html，所以如果在控制器里直接输出图片的话，需要在控制器最后一行加上：

```
return response()->contentType('image/png');

```

或者用exit

```
exit();

```

Author
======

[](#author)

Ryan Email:

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 58.8% of commits — single point of failure

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

Every ~0 days

Total

4

Last Release

2272d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/205f379e5d216f194d238b79c0aa92b43e3eb655f95b769687d1e330caf87f52?d=identicon)[9007967](/maintainers/9007967)

---

Top Contributors

[![moonwalkercui](https://avatars.githubusercontent.com/u/20033605?v=4)](https://github.com/moonwalkercui "moonwalkercui (10 commits)")[![9007967](https://avatars.githubusercontent.com/u/33853639?v=4)](https://github.com/9007967 "9007967 (7 commits)")

### Embed Badge

![Health badge](/badges/9007967-postermaker/health.svg)

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

###  Alternatives

[milon/barcode

Barcode generator like Qr Code, PDF417, C39, C39+, C39E, C39E+, C93, S25, S25+, I25, I25+, C128, C128A, C128B, C128C, 2-Digits UPC-Based Extention, 5-Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI (Variation of Plessey code)

1.5k13.3M39](/packages/milon-barcode)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[goat1000/svggraph

Generates SVG graphs

132849.6k3](/packages/goat1000-svggraph)[cohensive/embed

Media Embed (for Laravel or as a standalone).

120370.4k](/packages/cohensive-embed)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

63991.3k4](/packages/netresearch-rte-ckeditor-image)[humanmade/tachyon-plugin

Rewrites WordPress image URLs to use Tachyon

87338.5k2](/packages/humanmade-tachyon-plugin)

PHPackages © 2026

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