PHPackages                             mswarak/write-to-image - 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. mswarak/write-to-image

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

mswarak/write-to-image
======================

Add a text into jpg images with customized align (ltr, center and rtl)

v1.2.4(3y ago)1101proprietaryPHPPHP &gt;=5.3.0

Since Jun 5Pushed 3y ago1 watchersCompare

[ Source](https://github.com/mswarak/write-to-image)[ Packagist](https://packagist.org/packages/mswarak/write-to-image)[ RSS](/packages/mswarak-write-to-image/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)DependenciesVersions (6)Used By (0)

write-to-image
==============

[](#write-to-image)

- Clone this repository

```
$ git clone https://github.com/mswarak/write-to-image.git

```

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

[](#installation)

This project using composer

```
composer require mswarak/write-to-image

```

OR

```
require_once '../src/Write_To_Image.php';

```

Usage
-----

[](#usage)

```
// load Write_To_Image
use mswarak\Write_To_Image;
$image = new Write_To_Image('img.jpg');

// add default font
$image->set_default_font(dirname(__FILE__) . "/arial.ttf");

// add text
$image->text_ltr("hi 01", 25, 50, 50);
$image->text_ltr("hi 02", 25, 250, 250);

// preview image on browser
$image->preview();

```

Changelog
---------

[](#changelog)

**1.2.4 ( 2022/06/26 )**

- Support drawing lines.
- Support switch color from hex to RGB.

**1.2.3 ( 2022/06/17 )**

- Support drawing rectangles.
- Fix bugs.

**1.2.2 ( 2022/06/13 )**

- Support adding default font.
- Support drawing circles.

**1.2.1 ( 2022/06/09 )**

- Support multi-output file using text\_clear function.
- Fix bugs.

**1.2.0 ( 2022/06/05 )**

- Fix bugs.

**1.1 ( 2022/06/02 )**

- Support rtl.
- Improve Arabic encoding.
- Fix bugs.

**1.0 ( 2022/06/01 )**

- The first stable version.

**0.1-beta ( 2022/05/26 )**

- First release.

Credits
-------

[](#credits)

- [***Intervention / image***](https://github.com/Intervention/image)
- [***word2uni***](https://github.com/Null78/word2uni/blob/main/word2uni.php)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity46

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

Total

5

Last Release

1428d ago

### Community

Maintainers

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

---

Top Contributors

[![mswarak](https://avatars.githubusercontent.com/u/88332297?v=4)](https://github.com/mswarak "mswarak (46 commits)")

---

Tags

imagejpegimagesrtlimagewritertlimagejpeg

### Embed Badge

![Health badge](/badges/mswarak-write-to-image/health.svg)

```
[![Health](https://phpackages.com/badges/mswarak-write-to-image/health.svg)](https://phpackages.com/packages/mswarak-write-to-image)
```

###  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)[liip/imagine-bundle

This bundle provides an image manipulation abstraction toolkit for Symfony-based projects.

1.7k38.3M217](/packages/liip-imagine-bundle)[spatie/image

Manipulate images with an expressive API

1.4k54.4M138](/packages/spatie-image)[intervention/image-laravel

Laravel Integration of Intervention Image

1496.5M102](/packages/intervention-image-laravel)[nmcteam/image-with-text

Create images with embedded text and advanced typography

14073.5k](/packages/nmcteam-image-with-text)

PHPackages © 2026

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