PHPackages                             peterujah/nano-stamp - 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. peterujah/nano-stamp

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

peterujah/nano-stamp
====================

Nano Stamp is Php Class to create a custom stamp using the GD Graphics Library. It simplifies the process of generating stamps, such as circular and square designs, accompanied by dynamic text and styling.

1.0.2(2y ago)0281MITPHPPHP ^7.0 || ^8.0

Since Aug 27Pushed 2y ago1 watchersCompare

[ Source](https://github.com/peterujah/nano-stamp)[ Packagist](https://packagist.org/packages/peterujah/nano-stamp)[ Docs](https://github.com/peterujah/nano-stamp/)[ RSS](/packages/peterujah-nano-stamp/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (2)Used By (0)

Nano Stamp
==========

[](#nano-stamp)

Nano Stamp is Php Class to create a custom stamp using the GD Graphics Library. It simplifies the process of generating stamps, such as circular and square designs, accompanied by dynamic text and styling.

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

[](#installation)

Installation is available via Composer:

```
composer require peterujah/nano-stamp
```

Example Stamp
-------------

[](#example-stamp)

[![image 1](https://raw.githubusercontent.com/peterujah/nano-stamp/main/test/stamp_circle.png)](https://raw.githubusercontent.com/peterujah/nano-stamp/main/test/stamp_circle.png)[![image 2](https://raw.githubusercontent.com/peterujah/nano-stamp/main/test/stamp_circle_vertical.png)](https://raw.githubusercontent.com/peterujah/nano-stamp/main/test/stamp_circle_vertical.png)[![image 3](https://raw.githubusercontent.com/peterujah/nano-stamp/main/test/stamp_square.png)](https://raw.githubusercontent.com/peterujah/nano-stamp/main/test/stamp_square.png)

Initialize class
----------------

[](#initialize-class)

```
use Peterujah\NanoBlockTech\Stamp\Circle;
use Peterujah\NanoBlockTech\Stamp\Square;
use Peterujah\NanoBlockTech\Stamp\Colors;
use Peterujah\NanoBlockTech\Stamp\Stamp;
```

To draw a square stamp initialize with a square instance

```
$shape = new Stamp(new Square(400, 200));
```

To draw a round stamp initialize with a circle instance

```
$shape = new Stamp(new Circle(400, 400));
```

Use your stamp shape container instance

```
$stamp = $shape->getContainerInstance();
```

Set your text font path

```
$stamp->setFont(__DIR__ . '/font/industry-bold.ttf');
```

Set your background color or use the default transparent background

```
$stamp->setBackgroundColor(Colors::ALPHA_WHITE);
```

Drow your border with RGB color array

```
$stamp->drawBorder(Colors::VIOLET);
```

### For Square Shape Stamp

[](#for-square-shape-stamp)

Adjust the `right` and `top` to fit your text

```
$stamp->drawCenterText("My Company Name Here",[
    "fontSize" => 20,
    "color" => Colors::VIOLET,
    "right" => 125,
    "top" => -30,
]);
$stamp->drawCenterText("27 Aug 2023", [
    "fontSize" => 20,
    "color" => Colors::VIOLET,
    "right" => 80,
    "top" => 30,
]);
$stamp->drawCenterText("Verified Stamp", [
    "fontSize" => 20,
    "color" => Colors::VIOLET,
    "right" => 80,
    "top" => 90,
]);

$stamp->drawRightText("Vertical", [
    "fontSize" => 20,
    "color" => Colors::VIOLET,
    "top" => 110,
    "right" => 55,
]);

$stamp->drawLeftText("27 Aug 2023", [
    "fontSize" => 20,
    "color" => Colors::VIOLET,
    "top" => 170,
    "left" => 230,
]);
```

### For Circle Shape Stamp

[](#for-circle-shape-stamp)

Adjust the `left` and `top` to fit your text

Drow round text

```
$stamp->drawRoundText("Round Text Here", 20, Colors::VIOLET, true);
```

Drow a center text

```
$stamp->drawCenterText("Horizontal Text Here", [
    "fontSize" => 20,
    "color" => Colors::VIOLET,
    "top" => 200,
    "left" => 60,
]);
$stamp->drawCenterText("27 Aug 2023", [
    "fontSize" => 20,
    "color" => Colors::VIOLET,
    "top" => 250,
    "left" => 60,
]);
```

To draw a vertical center text only available for circle shape stamp

```
$stamp->drawVerticalText("Vertical Text Here", [
    "fontSize" => 20,
    "color" => Colors::VIOLET,
    "top" => 220,
    "left" => 10,
]);
$stamp->drawVerticalText("27 Aug 2023", [
    "fontSize" => 20,
    "color" => Colors::VIOLET,
    "top" => 170,
    "left" => 15,
]);
```

Now save, download or preview generated stamp Flag `D = Download, S = Save, I = Display `

```
$stamp->create('stamp_image.png', "S");
```

### More Methods

[](#more-methods)

To add an image overlay

```
$stamp->drawCenterImage(__DIR__ . "/company-logo.png", [
    "top" => 0,
    "left" => 0,
    "width" => 50,
    "height" => 50
]);
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

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

985d ago

### Community

Maintainers

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

---

Top Contributors

[![peterujah](https://avatars.githubusercontent.com/u/16369609?v=4)](https://github.com/peterujah "peterujah (36 commits)")

---

Tags

phpphpclasspngstamplibrarystampphp classphp stampcreate stampphp stamp classstamp image

### Embed Badge

![Health badge](/badges/peterujah-nano-stamp/health.svg)

```
[![Health](https://phpackages.com/badges/peterujah-nano-stamp/health.svg)](https://phpackages.com/packages/peterujah-nano-stamp)
```

###  Alternatives

[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)[asgardcms/media-module

Media module for AsgardCMS. Handles the media library.

1130.6k2](/packages/asgardcms-media-module)[mariojgt/witchcraft

A Laravel Package Witchcraft, a quick start for new laravel Packages

312.6k](/packages/mariojgt-witchcraft)

PHPackages © 2026

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