PHPackages                             vyalov.alexander/imagedefender - 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. vyalov.alexander/imagedefender

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

vyalov.alexander/imagedefender
==============================

Imposition of a protective mask on an image

3.1.0(7y ago)0251MITPHPPHP &gt;=7.0.0

Since Aug 3Pushed 7y agoCompare

[ Source](https://github.com/VyalovAlexander/ImageDefender)[ Packagist](https://packagist.org/packages/vyalov.alexander/imagedefender)[ RSS](/packages/vyalovalexander-imagedefender/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (8)Used By (0)

About ImageDefender
===================

[](#about-imagedefender)

---

ImageDefender is a PHP library for protecting images against copying. It allows to overaly an image (stamp) or text (sign) to your picture, to prevent unlicensed copying of your content.

Installation
------------

[](#installation)

### Composer

[](#composer)

Execute the following command to get the latest version of the package:

```
composer require vyalov.alexander/imagedefender

```

Check you php.ini you must see, something like this:

GD Support enabled
GD Version bundled (2.0.28 compatible)

Usage
-----

[](#usage)

GD realisation of ImageDefenderInterface
----------------------------------------

[](#gd-realisation-of-imagedefenderinterface)

```
$factory = new \VyalovAlexander\ImageDefender\GD\GDImageDefenderFactory();

//Objects are ready to work
$signDefender = $factory->getSignImageDefender();
$stampDefender = $factory->getStampImageDefender();
```

### Stamp

[](#stamp)

```
//you can configure your "stamp defender"
$stampDefender->setStamp('path/to/stmap/image.png')
    ->setStampHeight($height)
    ->setStampWidth($width)
    ->setStampMarginRight($marginRight)
    ->setStampMarginBottom($marginBottom)
    ->setStampTransparency($transparency);

$stampDefender->impose('path/to/picture/you/want/to/protect.png', "/save/path/of/resulting/picture.png");
```

[![Stamp](https://camo.githubusercontent.com/0857a19750d82d691654b470ef1b6bf114de042d9fe88cfeda39b58b3fd7e47a/68747470733a2f2f707265766965772e6962622e636f2f6766594d4c652f7374616d702e706e67)](https://camo.githubusercontent.com/0857a19750d82d691654b470ef1b6bf114de042d9fe88cfeda39b58b3fd7e47a/68747470733a2f2f707265766965772e6962622e636f2f6766594d4c652f7374616d702e706e67)

### Sign

[](#sign)

```
//you can configure your "sign defender"
$signDefender->setFont('path/to/your/TTF/font.ttf')
        ->setSign($textYouWantToImpose)
        ->setSignAngle($textAngle)
        ->setSignColor($red, $green, $blue)
        ->setSignFontSize($fontSize)
        ->setSignMarginBottom($marginRight)
        ->setSignMarginRight($marginRight)
        ->setSignTransparency($textTransparency);

$signDefender->impose('path/to/picture/you/want/to/protect.png', "/save/path/of/resulting/picture.png");
```

[![Text](https://camo.githubusercontent.com/fcf88556d017132e33330255f23f4df08ea566c45ac461ce048adf742f16e0fe/68747470733a2f2f707265766965772e6962622e636f2f6435454e524b2f746578742e706e67)](https://camo.githubusercontent.com/fcf88556d017132e33330255f23f4df08ea566c45ac461ce048adf742f16e0fe/68747470733a2f2f707265766965772e6962622e636f2f6435454e524b2f746578742e706e67)

License
-------

[](#license)

The ImageDefender library is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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 ~1 days

Total

7

Last Release

2881d ago

Major Versions

1.1.0 → 2.0.02018-08-03

2.0.2 → 3.0.02018-08-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/1637f91be32662f5d4092562fecd9701a1123a0f9060019ced7702e0d2aa157e?d=identicon)[vyalov.alexander](/maintainers/vyalov.alexander)

---

Top Contributors

[![VyalovAlexander](https://avatars.githubusercontent.com/u/29748954?v=4)](https://github.com/VyalovAlexander "VyalovAlexander (19 commits)")

### Embed Badge

![Health badge](/badges/vyalovalexander-imagedefender/health.svg)

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

###  Alternatives

[goat1000/svggraph

Generates SVG graphs

133890.0k3](/packages/goat1000-svggraph)[imagekit/imagekit

PHP library for Imagekit

46877.3k10](/packages/imagekit-imagekit)[gravatarphp/gravatar

Gravatar URL builder which is most commonly called as a Gravatar library

12644.1k2](/packages/gravatarphp-gravatar)

PHPackages © 2026

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