arnapou/image

Library - Image basic manipulations.

Installs: 2

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Forks: 0

pkg:composer/arnapou/image

v1.0.1 2025-12-03 11:40 UTC

This package is auto-updated.

Last update: 2025-12-03 10:41:17 UTC


README

pipeline coverage

This library is a simple tool to do basic image manipulations.

Installation

composer require arnapou/image

packagist 👉️ arnapou/image

Introduction

The goal of this library is to provide a very easy way to do basic manipulations of images like

  • resizing
  • watermarking

This is an opinionated abstraction around Imagick and GD

Main goal: "It just works !" effect.

use Arnapou\Image\PhpImage;
use Arnapou\Image\Geometry\Position;
use Arnapou\Image\Geometry\ResizeMode;
use Arnapou\Image\Geometry\Size;
use Arnapou\Image\Operation\Resize;
use Arnapou\Image\Operation\Watermark;

$phpImage = new PhpImage();
$phpImage->fileToFile(
    source: '/src/file.jpg',
    destination: '/dst/file.png',
    operations: [
        new Resize(new Size(200, 200), ResizeMode::Fill),
        new Watermark('/path/watermark.png', Position::BottomRight),
    ],
    quality: 90
);

Php versions

DateRef8.58.48.3
28/11/20251.0.x, main×××