PHPackages                             tigra-image-library/ascii-art - 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. tigra-image-library/ascii-art

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

tigra-image-library/ascii-art
=============================

This class can generate a text that looks like a given image. It traverses the pixels of a given image and converts the color values of each region to a character text, so when you look at the sequence of converted characters it looks like the original image. The result text can optionally be outputted formatted as HTML and be displayed in color.

1.0.1(8y ago)251LGPL-3.0-onlyPHPPHP ^5.4

Since Mar 11Pushed 7y ago2 watchersCompare

[ Source](https://github.com/artur-graniszewski/tigra-ascii-art)[ Packagist](https://packagist.org/packages/tigra-image-library/ascii-art)[ Docs](https://github.com/artur-graniszewski/tigra-ascii-art)[ RSS](/packages/tigra-image-library-ascii-art/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (1)Versions (4)Used By (0)

ASCII ART GENERATOR
===================

[](#ascii-art-generator)

Introduction
------------

[](#introduction)

This class can generate a text that looks like a given image.

It traverses the pixels of a given image and converts the color values of each region to a character text, so when you look at the sequence of converted characters it looks like the original image.

The result text can optionally be outputted formatted as HTML and be displayed in color.

Sample output
-------------

[](#sample-output)

### Original image

[](#original-image)

[![Original](https://camo.githubusercontent.com/792c903cd49bfa0ae39c2c9bee2595c38b08b095a18853d562d8e520f8b795e8/687474703a2f2f7068702e7765627475746f722e706c2f61736369692d6172742f6578616d706c652e6a7067)](https://camo.githubusercontent.com/792c903cd49bfa0ae39c2c9bee2595c38b08b095a18853d562d8e520f8b795e8/687474703a2f2f7068702e7765627475746f722e706c2f61736369692d6172742f6578616d706c652e6a7067)

### ASCII art after image crop

[](#ascii-art-after-image-crop)

[![Result](https://camo.githubusercontent.com/3e9876f75687ae1519ed06729eddea94ee40f2be48ac80d2cd3a3f2a15740b3b/687474703a2f2f7068702e7765627475746f722e706c2f61736369692d6172742f61736369695f6172742e6a7067)](https://camo.githubusercontent.com/3e9876f75687ae1519ed06729eddea94ee40f2be48ac80d2cd3a3f2a15740b3b/687474703a2f2f7068702e7765627475746f722e706c2f61736369692d6172742f61736369695f6172742e6a7067)

Code example
------------

[](#code-example)

```
