Basic Mechanics
phMagick philosophy is extremely simple, you say where is the source image and where you want the new image and then apply actions to it
One great feature of phMagick is that you can apply several actions to an image, making it extremely powerful and able to create very complex images
In the combination example you will see how easy it is to create a thumbnail with rounded corners and then applying a drop shadow to it.
Enough talking, let’s look at some example code to see its simplicity
1 2 3 | include "phMagick.php"; $p = new phMagick("source.png","destination.png"); $p->rotate(45); |
In the first line we tell PHP that we are using a file named phMagick.php, it’s were phMagick is declared, you only need to do this once.
Line 2 creates a phMagick instance, and say that source.png will be our source image and destination.png will be the new image
Line 3 does the magic, in this case rotates source.png 45 degrees and saves it as destination.png
Hi – this looks like a great library. I’m wondering – does this handle uploading at all? Or does there already have to be an image on the server for it to do anything with it?
Thanks!
No, it only handles image manipulation
@Joel
Hi but u can combine it with swfupload and the swfobject works 4 me and my private projects.
And needless to say big TY to nuno costa