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

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

daichong/share-poster
=====================

Image synthesis, image processing, personal poster image and sharing image generation。生成海报图、水印、调整图片大小、图片中插入文字等等

v1.0(4y ago)152MITPHP

Since Aug 13Pushed 4y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (2)Used By (0)

php生成海报图
========

[](#php生成海报图)

Image watermark
===============

[](#image-watermark)

share-poster
============

[](#share-poster)

Image synthesis, image processing, personal poster image and sharing image generation, Image watermark.

Installation
============

[](#installation)

[github](https://github.com/DaiChongyu/share-poster.git) &amp;&amp; composer (composer require daichong/share-poster)

Usage
=====

[](#usage)

合成海报图
-----

[](#合成海报图)

```
use DaiChong\SharePoster\Image;
use DaiChong\SharePoster\Helper;
use DaiChong\SharePoster\Text;

// 用一张图片创建一个图像画板
$image = new Image();
$mainBg = $image->setFile('./1.png')//设置图片路径
    ->fillWhiteBg(true) //是否填充白色背景
    ->setSize(516, 686) // 设置大小
    ->create();

// copy class
$image1 = clone $image;
$image1->setFile('./logo.png')
    ->setSize(64, 64)
    ->setPosition(30, 555) //设置合并位置
    ->merge(); // 合并图片

// 把文字插入图片中
$text = new Text();
try {
    $text->setFontFile('./pingfang.ttf') //设置字体路径
        ->setImgResource($mainBg) //设置主图资源
        ->setPosition(110, 580) // 文字位置
        ->setSize(12) //文字大小
        ->setColor('black') //文字颜色
        ->setText('你好你好你好你好你好你好你好') //文字内容
        ->setFontWidth(200) //文字最大宽度
        ->setEllipsis('...') // 超出显示省略号
        ->setAutoWrap(true) // 是否自动换行
        ->insert();
} catch (Exception $e) {
    echo $e->getMessage();
}

(new Helper())->look($mainBg); //在浏览器查看图片

(new Helper())->save($mainBg,'./2.png'); //保存图片到指定路径
```

创建纯颜色画板
-------

[](#创建纯颜色画板)

```
use DaiChong\SharePoster\DrawBoard;
use \DaiChong\SharePoster\CopyMerge;
use DaiChong\SharePoster\Helper;

// 创建一个画板
$board = new DrawBoard();
$mainBg1 = $board->setSize(360, 750) //大小
    ->setColor(255, 255, 255) //颜色
    ->create();

$board1 = clone $board;
$mainBg2 = $board1->setSize(360, 100)
    ->setColor(0, 0, 0)
    ->create();

// 合并两个画板
$mainBg = (new CopyMerge())
    ->setResource($mainBg1, $mainBg2)
    ->setSize(0, 0) //是否调整大小，0表示不调整
    ->setOption(0, 0)// 合并位置
    ->merge();

(new Helper())->look($mainBg);
```

Effect
======

[](#effect)

[![](https://github.com/DaiChongyu/phpgd-CreatePoster/raw/1.0.0/demo/success.png?raw=true)](https://github.com/DaiChongyu/phpgd-CreatePoster/blob/1.0.0/demo/success.png?raw=true)

Contact
=======

[](#contact)

Problems, comments, and suggestions all welcome:

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

1734d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b10ad1cf921e1d6b46eb15353ea49f876fad511d5581b8d3eba194a4f863cd30?d=identicon)[DaiChongyu](/maintainers/DaiChongyu)

---

Top Contributors

[![daichongweb](https://avatars.githubusercontent.com/u/22912524?v=4)](https://github.com/daichongweb "daichongweb (10 commits)")

---

Tags

imagewatermarkshareposter

### Embed Badge

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

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

###  Alternatives

[intervention/image

PHP Image Processing

14.3k194.3M2.2k](/packages/intervention-image)[sybio/image-workshop

Powerful PHP class using GD library to work easily with images including layer notion (like Photoshop or GIMP)

860918.1k11](/packages/sybio-image-workshop)[intervention/image-laravel

Laravel Integration of Intervention Image

1496.5M102](/packages/intervention-image-laravel)[aplus/image

Aplus Framework Image Library

2211.6M1](/packages/aplus-image)[folklore/image

Image manipulation library for Laravel 5 based on Imagine and inspired by Croppa for easy url based manipulation

270248.2k5](/packages/folklore-image)[jbzoo/image

A PHP class that simplifies working with images

171126.9k3](/packages/jbzoo-image)

PHPackages © 2026

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