How to crop image in Image_Canvas PHP PEAR package -


I can not get it to work just does nothing I use the Image_Canvas PEAR package on shared hosting I am doing but I can not crop the image.

My syntax is:

  $ canvas-> SetClugging (array 'X0' => 10, 'y0' => 10, 'x1' => 200, 'y1' => 200));  

Any ideas?

I'm not familiar with that image Image_Canvas peer package, but I've just tried to do it and Have found that if setClipping you will add a second call to the same method without any parameters!

  $ Canvas = & amp; Image_Canvas :: factory ((isset ($ _GET ['canvas']) $ _GET ['canvas']: 'PNG', array ('width' => 500, 'height' => 333, 'file name' = & Gt; 'yourImage.jpg')); $ Canvas-> Setting (array ('x0' => 10, 'y0' => 10, 'x1' => 200, 'y1' => 200)); $ Canvas-> Image (array ('x' => 0, 'y' => 0, 'filename' = & gt; './yourImage.jpg')); $ Canvas-> SetClipping (); $ Canvas-> Show ();  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -