News Feed
Sections




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

Bubble.ro:
How to create the histogram of an image using PHP
November 01, 2006 @ 10:18:43

On the Bubble.ro website, there's an interesting tutorial that guides you through the creation of a histogram for any image (that PHP can handle) automatically with a little GD functionality.

The algorithm to calculate the histogram for an image is pretty straight forward if you know how to extract the RGB value of each pixel, by counting the number of pixels of each value (and then divide by the total number of pixels in order to get a normalized value).

They share the simple script that grabs the image's data, analyzes it, and, superimposed on one corner of it, places the histogram image. They have the full source and examples available for download.

0 comments voice your opinion now!
histogram image gd automatically highs lows histogram image gd automatically highs lows


blog comments powered by Disqus

Similar Posts

Pierre\'s Blog: What\'s new in GD, 5.1.x

Cory Borrow's Blog: Creating thumbs from textfiles with PHP and GD

Bubble.ro: How to create the histogram of an image using PHP

Richard Davey's Blog: Interesting memory use with GD images

Jakob Westhoff's Blog: It's alive - Image_3D live browser rendering


Community Events





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


zendserver framework release community list api symfony code voicesoftheelephpant language threedevsandamaybe podcast bugfix series laravel introduction interview tips conference deployment

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