PHPackages                             magicfier/image - 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. magicfier/image

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

magicfier/image
===============

图片处理(缩略图,裁切,水印,圆形头像), 合成图片, 合成文字

1.0.8(7y ago)1149Apache-2.0PHPPHP &gt;=5.5.0

Since Jan 2Pushed 7y agoCompare

[ Source](https://github.com/githubfisher/image)[ Packagist](https://packagist.org/packages/magicfier/image)[ Docs](https://github.com/githubfisher/image)[ RSS](/packages/magicfier-image/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (6)DependenciesVersions (10)Used By (0)

### 说明

[](#说明)

```
 1. 文件编码遵循 psr-4 规范
 2. 支持本地，远程，字符串图片转化成系统可操作的resource变量类型
 3. 支持略缩图，圆形，裁剪，水印，压缩
 4. 调用对应的函数可输出到浏览器，可保存(保存到远程服务器请自行配置), 也可以直接转换成base64型编码输出
 5. 图片格式仅包含png,jpg,jpeg,gif（远程图片，图片字符串任意类型）
 6. 支持合成图片, 合成文字
 7. 支持自定义尺寸

```

### 使用

[](#使用)

```
 具体使用说明及实例, 请阅读DOCUMENT.md

```

### 依赖

[](#依赖)

```
1. php >= 5.5
2. gd库
3. 远程https图片资源，需支持curl或者openssl

```

### 建议

[](#建议)

```
在转化远程图片时，imagecreatefromjpeg等方法支持直接转化，https协议下，需要环境支持openssl

linux系统下，开始openssl后出现证书等验证失败，可以使用curl获取到图片资源，然后使用imagecreatefromstring进行转化，

所以可根据实际情况友好的选择使用$image->transImageResource(), 第二个参数得到可操作的resource类型图片

```

### 优化

[](#优化)

```
查看远程图片的类型，可以使用curl打印出头信息，查看Content-type:xx的值

如：Content-type:image/png ,Content-type:image/jpeg等

```

### 下载

[](#下载)

```
 composer require magicfier/image

```

### 使用

[](#使用-1)

```
 use Magicfier/image;

 $image = new Image();
 $image->mergeImage($newImagePath, $extend, $width, $height, $top, $left, $originWidth, $originHeight);
 $image->output($extend);

```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 72.3% 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 ~43 days

Recently: every ~1 days

Total

8

Last Release

2754d ago

PHP version history (2 changes)1.0.1PHP &gt;=5.4.0

1.0.2PHP &gt;=5.5.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/51b113ad2acb41f36c6bfc286506c8d6243bb5bd5acd0345de2b4803c5a0a40a?d=identicon)[githubfisher](/maintainers/githubfisher)

---

Top Contributors

[![magein](https://avatars.githubusercontent.com/u/16146901?v=4)](https://github.com/magein "magein (34 commits)")[![githubfisher](https://avatars.githubusercontent.com/u/22123608?v=4)](https://github.com/githubfisher "githubfisher (13 commits)")

### Embed Badge

![Health badge](/badges/magicfier-image/health.svg)

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

###  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)[char0n/ffmpeg-php

PHP wrapper for FFmpeg application

495225.1k1](/packages/char0n-ffmpeg-php)[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)

PHPackages © 2026

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