source: libpipi/trunk/pipi-php/examples/histogram.php @ 3080

Last change on this file since 3080 was 3080, checked in by nico, 12 years ago

Add php binding for functions: pipi_render_histogram, pipi_get_image_histogram
Add a sample program: examples/histogram.php

File size: 339 bytes
Line 
1<?
2$img = pipi_load_stock("random:128x128");
3$img = pipi_gaussian_blur($img, 10);
4$img = pipi_contrast($img, 0.98);
5
6$histogram = pipi_new_histogram();
7$histogram_img = pipi_new(320, 200);
8echo pipi_get_image_histogram($img, $histogram, 1);
9echo pipi_render_histogram($img_histogram, $histogram, 1);
10
11pipi_save($histogram_img, "out.png");
Note: See TracBrowser for help on using the repository browser.