PHPackages                             iamapen/dmimage-plugin - 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. iamapen/dmimage-plugin

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

iamapen/dmimage-plugin
======================

Rotate/Flip Filters for DmImage

0.1.2(9y ago)030MITPHPPHP &gt;=5.3.1

Since Oct 19Pushed 9y ago1 watchersCompare

[ Source](https://github.com/iamapen/DmImagePlugin)[ Packagist](https://packagist.org/packages/iamapen/dmimage-plugin)[ Docs](https://github.com/iamapen/DmImagePlugins)[ RSS](/packages/iamapen-dmimage-plugin/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (4)Dependencies (2)Versions (5)Used By (0)

DmImagePlugin
=============

[](#dmimageplugin)

gdラッパの画像処理ライブラリ [DmImage](https://github.com/demouth/DmImage) 用の拡張。

- Filters

    - 水平反転フィルタ
    - 垂直反転フィルタ
    - 度数指定による回転フィルタ
- FilterFactories

    - Exif orientation に基づく 回転/反転 フィルタ群

Install
=======

[](#install)

```
composer require "iamapen/dmimage-plugin" "demouth/dmimage:dev-master#cf14053c5a57fc001eb124802f0e824bf0f19803"
```

[DmImage](https://github.com/demouth/DmImage) にタグが打たれていない。
安定バージョンの存在しないライブラリは、利用側(ルートパッケージ) でコミットを指定する必要がある。

現時点(2016-10-20) での最新のコミット [cf14053](https://github.com/demouth/DmImage/commit/cf14053c5a57fc001eb124802f0e824bf0f19803)であり、当ライブラリはこれを前提に作成されている。
DmImage 側のAPIに変更がない限りは `@dev` 指定でもよいのだが、それは保証されていない。

Usage
=====

[](#usage)

### 水平反転

[](#水平反転)

```
$filters = [];
$filters[] = new \Iamapen\DmImagePlugin\DmImage\Filter\HFlip();

$image = new \Dm_Image_File($src);
$image->applyFilters($filters)->saveTo($dest, 'jpg', 90);
```

### 垂直反転

[](#垂直反転)

```
$filters = [];
$filters[] = new \Iamapen\DmImagePlugin\DmImage\Filter\VFlip();

$image = new \Dm_Image_File($src);
$image->applyFilters($filters)->saveTo($dest, 'jpg', 90);
```

### 回転

[](#回転)

右回転もしくは左回転の角度を指定してフィルタを作る。

```
$filters = [];
// 右180度回転
$filters[] = \Iamapen\DmImagePlugin\DmImage\Filter\Rotate::createByRightAngle(180);
// 左90度回転
$filters[] = \Iamapen\DmImagePlugin\DmImage\Filter\Rotate::createByLeftAngle(90);

$image = new \Dm_Image_File($src);
$image->applyFilters($filters)->saveTo($dest, 'jpg', 90);
```

### Exif Orientation に基づく 回転/反転

[](#exif-orientation-に基づく-回転反転)

`FactoryExif::createFilters($orientation)` で、相応しいフィルタ群を生成できる。

```
// Exif情報取得
$exif = exif_read_data($src);

// Orientation からふさわしいフィルタ群生成
$filters = [];
if(array_key_exists('Orientation', $exif)) {
  $filters = \Iamapen\DmImagePlugin\DmImage\Filter\FactoryExif::createFilters($exif['Orientation']);
}

// フィルタ適用
$image = new \Dm_Image_File($src);
$image->applyFilters($filters)->saveTo($dest, 'jpg', 90);
```

ライセンス
=====

[](#ライセンス)

MIT License

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

Every ~0 days

Total

4

Last Release

3496d ago

### Community

Maintainers

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

---

Top Contributors

[![iamapen](https://avatars.githubusercontent.com/u/415157?v=4)](https://github.com/iamapen "iamapen (1 commits)")

---

Tags

gdexifdmimage

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/iamapen-dmimage-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/iamapen-dmimage-plugin/health.svg)](https://phpackages.com/packages/iamapen-dmimage-plugin)
```

###  Alternatives

[intervention/image

PHP Image Processing

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

Wonderfully easy on-demand image manipulation library with an HTTP based API.

2.6k51.2M116](/packages/league-glide)[gregwar/image

Image handling

1.0k4.1M51](/packages/gregwar-image)[rosell-dk/webp-convert

Convert JPEG &amp; PNG to WebP with PHP

6038.1M54](/packages/rosell-dk-webp-convert)[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)

PHPackages © 2026

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