Login   Register  
PHP Classes
elePHPant
Icontem

File: samples.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Mitchelle Pascual  >  Image Crusher  >  samples.php  >  Download  
File: samples.php
Role: Example script
Content type: text/plain
Description: Example usages
Class: Image Crusher
Compress PNG or JPEG images with external programs
Author: By
Last change:
Date: 2 years ago
Size: 376 bytes
 

Contents

Class file image Download
#!/usr/bin/php
<?php
require 'ImageCrusher.php';

//Simple usage (png)
//$crusher = new ImageCrusher( 'images/php-png.png', 'images/php-png_c.png' );
//$crusher->crush();

//Simple usage (jpg)
//$crusher = new ImageCrusher( 'images/php-jpg.jpg', 'images/php-jpg_c.jpg' );
//$crusher->crush();

// Batch compress
//ImageCrusher::batch( '/path/of/images', true ); // recursive