PHPackages                             codeinc/watermarker-client - 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. codeinc/watermarker-client

Abandoned → [codeinc/document-cloud-client](/?search=codeinc%2Fdocument-cloud-client)ArchivedLibrary[Image &amp; Media](/categories/media)

codeinc/watermarker-client
==========================

A PHP client for the watermarker service

v1.5(1y ago)017MITPHPPHP &gt;=8.3

Since Feb 24Pushed 1y ago1 watchersCompare

[ Source](https://github.com/codeinchq/watermarker-php-client)[ Packagist](https://packagist.org/packages/codeinc/watermarker-client)[ Docs](https://github.com/codeinchq/watermarker-php-client)[ RSS](/packages/codeinc-watermarker-client/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (6)Versions (7)Used By (0)

Watermarker PHP client
======================

[](#watermarker-php-client)

[![Code Inc.](https://camo.githubusercontent.com/2db4163e178cfd4f491177b7b2d742c9d67157e8f770a5ad4dc03cf28591bb29/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f6465253230496e632e2d57617465726d61726b65722d626c7565)](https://github.com/codeinchq/watermarker)[![Tests](https://github.com/codeinchq/watermarker-php-client/actions/workflows/phpunit.yml/badge.svg)](https://github.com/codeinchq/watermarker-php-client/actions/workflows/phpunit.yml/badge.svg)

Important

This client is deprecated and is replaced by the [Document Cloud PHP Client](https://github.com/codeinchq/document-cloud-php-client)

This repository contains a PHP 8.2+ client library for watermarking images using the [watermarker](https://github.com/codeinchq/watermarker) service.

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

[](#installation)

The library is available on [Packagist](https://packagist.org/packages/codeinc/watermarker-client). The recommended way to install it is via Composer:

```
composer require codeinc/watermarker-client
```

Usage
-----

[](#usage)

This client requires a running instance of the [watermarker](https://github.com/codeinchq/watermarker) service. The service can be run locally [using Docker](https://hub.docker.com/r/codeinchq/watermarker) or deployed to a server.

### Examples

[](#examples)

#### A simple scenario to apply a watermark to an image and display the result:

[](#a-simple-scenario-to-apply-a-watermark-to-an-image-and-display-the-result)

```
use CodeInc\WatermarkerClient\WatermarkerClient;
use CodeInc\WatermarkerClient\Exception;

$apiBaseUri = 'http://localhost:3000/';
$anImage = '/path/to/local/image.png';
$theWatermark = '/path/to/local/watermark.png';

try {
    $client = new WatermarkerClient($apiBaseUri);

    // apply the watermark
    $watermarkedImageStream = $client->apply(
        $client->createStreamFromFile($anImage),
        $client->createStreamFromFile($theWatermark),
    );

    // display the watermarked image
    header('Content-Type: image/png');
    echo (string)$watermarkedImageStream;
}
catch (Exception $e) {
    // handle exception
}
```

#### A mire complex scenario to apply a watermark to an image with options and save the result to a file:

[](#a-mire-complex-scenario-to-apply-a-watermark-to-an-image-with-options-and-save-the-result-to-a-file)

```
use CodeInc\WatermarkerClient\WatermarkerClient;
use CodeInc\WatermarkerClient\ConvertOptions;
use CodeInc\WatermarkerClient\Position;
use CodeInc\WatermarkerClient\Format;

$apiBaseUri = 'http://localhost:3000/';
$theImageStream = '/path/to/local/image.png';
$theWatermarkStream = '/path/to/local/watermark.png';
$theDestinationFile = '/path/to/local/destination.png';
$convertOption = new ConvertOptions(
    size: 50,
    position: Position::topRight,
    format: Format::jpg,
    quality: 80,
    blur: 3,
    opacity: 75
);

try {
    $streamFactory = Psr17FactoryDiscovery::findStreamFactory();
    $client = new WatermarkerClient($apiBaseUri);

    // apply the watermark
    $watermarkedImageStream = $client->apply(
        $client->createStreamFromFile($theImageStream),
        $client->createStreamFromFile($theWatermarkStream),
        $convertOption
    );

    // save the watermarked image
    $client->saveStreamToFile($watermarkedImageStream, $theDestinationFile);
}
catch (Exception $e) {
    // handle exception
}
```

License
-------

[](#license)

The library is published under the MIT license (see [`LICENSE`](LICENSE) file).

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity61

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

Recently: every ~73 days

Total

6

Last Release

569d ago

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/8f72f949d7f70e400c02c225685f1934dec6219689f25edec38b4037df166d58?d=identicon)[codeinc](/maintainers/codeinc)

---

Top Contributors

[![joanfabregat](https://avatars.githubusercontent.com/u/4227907?v=4)](https://github.com/joanfabregat "joanfabregat (27 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/codeinc-watermarker-client/health.svg)

```
[![Health](https://phpackages.com/badges/codeinc-watermarker-client/health.svg)](https://phpackages.com/packages/codeinc-watermarker-client)
```

###  Alternatives

[openai-php/client

OpenAI PHP is a supercharged PHP API client that allows you to interact with the Open AI API

5.8k28.0M311](/packages/openai-php-client)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35789.4k2](/packages/telnyx-telnyx-php)[mailgun/mailgun-php

The Mailgun SDK provides methods for all API functions.

1.1k30.8M181](/packages/mailgun-mailgun-php)[deeplcom/deepl-php

Official DeepL API Client Library

2607.3M110](/packages/deeplcom-deepl-php)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M733](/packages/sylius-sylius)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

1003.9M50](/packages/getbrevo-brevo-php)

PHPackages © 2026

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