WideImage 1.0 branch (discontinued)

WideImage Wiki : SimpleExamples

MainPage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register
Support This Project SourceForge.net Logo
Important notice: the development of WideImage 1.0 branch is discontinued. Please visit http://wideimage.sourceforge.net for the new version of library and documentation.
This web site will remain accessible to serve as documentation for the old versions of the library. For help on migration, please refer to the migration guide.
Most recent edit on 2007-07-24 13:43:40 by GasperKozak

Additions:
For more, see ImageOperations.



Edited on 2007-03-03 11:34:41 by GasperKozak

Additions:

CategoryDoc




Edited on 2007-03-02 17:27:43 by GasperKozak

Additions:
$new_img = $img->merge($watermark, 40, 80);

Deletions:
$new_img = $watermark->merge($img, 40, 80);



Edited on 2007-03-02 16:52:52 by GasperKozak

Additions:
Load, crop, flip and output to browser in one line (no http headers included):

Deletions:
echo ;
<?php
echo
;
?>
Load, crop, flip and output to browser in one line:




Edited on 2007-03-02 16:52:22 by GasperKozak

Additions:
echo ;
echo
;




Edited on 2007-03-02 16:52:05 by GasperKozak

Additions:
<?php
?>




Oldest known version of this page was edited on 2007-03-02 16:51:38 by GasperKozak []
Page view:

Simple examples


Simple load, resize and save:
$image = wiImage::load('/path/to/an/image.png');
$resized = $image->resize(400, 300);
$resized->saveToFile('/path/to/resized.png');


Chaining operations:
$img = wiImage::load('image.png');
$img->resize(200, 500)->saveToFile('new.png');


A long chain:
$img = wiImage::load('image.png');
$img->resize(200, 500)->crop(10, 10, 80, 80)->asGrayscale()->saveToFile('new.png');


Load, crop, flip and output to browser in one line:
echo wiImage::load('image.png')->crop(30, 30, '50%', '50%')->flip()->asString('png');


Merge example:
$img = wiImage::load('pic.jpeg');
$watermark = wiImage::load('watermark.jpg');
$new_img = $watermark->merge($img, 40, 80);
WideImage - an Object-Oriented PHP Image Library for Image manipulation
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.2
Page was generated in 0.1231 seconds