News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Anonwhat:
ASCII Art Generator
August 07, 2013 @ 09:52:18

In the "something completely different" category today, anonwhat has created an image-to-ASCII art tutorial that takes in an image and, using PHP's GD functionality and a bit of logic, transforms it.

In this tutorial, we are going to create a simple web-based ASCII Art Generator. The concepts found in this tutorial can be applied to other languages. [It is] a simple ASCII Art Generator takes in an image, grayscales it, pixelates it, then prints out a character for each block on the pixelated image based on how "dark" the block is.

The tutorial walks you through the steps needed to make the simple script. It analyzes the image looking at the "blackness" (a combination of the values from imagecolorat and imagecolorsforindex). ACSII characters are then substituted for different "blackness" ranges with the result looking something like this.

0 comments voice your opinion now!
ascii art image tranform blackness gd tutorial

Link: http://fuzzicode.com/create/ascii-art-generator

blog comments powered by Disqus

Similar Posts

Zend Developer Zone: Migrating applications from PHP 4 to Zend Core 2.5 w/support for IBM Informix

Kae Verens' Blog: php and jquery chp7: image manipulation

Bhaskar Karambelkar\'s Blog: Prototyping LAMP with WAMP

NetTuts.com: Dates and Time - The OOP Way

SitePoint PHP Blog: Getting Started with PHP Extension Development via PHP-CPP


Community Events

Don't see your event here?
Let us know!


framework language api extension introduction series unittest interview opinion wordpress release threedevsandamaybe voicesoftheelephpant podcast laravel library feature development community laravel5

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework