class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
1. User should upload an image. Then user can see re sized image. (Ajax request) 2. User should select an area from the re sized image. Crop the image according to user's selection. 3. Then create another object. [$handle2->upload('path/to/local/file')] and apply cropped (step 2) image as a water mark 4. Then store in DB (file name only)
I have created 3 image objects ($handle1, $handle2, $handle3) to do this.
The image which on my server is static image. That image should be background image.Cropped image use as a watermark on the my image.
$handle= new upload("/home1/ribelzxxx/public_html/apps/xxxx/images/mergePhone.png");
When calling above statement will be deleted 'mergePhone.png' and renamed as 'mergePhone.png'. i want to keep 'mergePhone.png' in without rename. this image call every image processing.Reply
Re: Use this class with images are already on the server new!
If I understand properly, you don't want your source image to be deleted, is that right? In that case, don't call $handle->clean() at the end of your process.Reply
Re: Use this class with images are already on the server new!
how can I use this class to manipulate images are already on the server?
I don't need the upload process.
Is there a way to adapt this class?
Thanks
This is the way which i used to upload local file
$handle= new upload("/home1/ribelzxxx/public_html/apps/xxxx/images/mergePhone.png");
This can be used only one time. After 1 image processing 'mergePhone.png' renamed as 'mergePhone_1.png'.
I used $handle->file_overwrite = true; but it won't.
'mergePhone.png' image is use to every image. It as a main image.
What is the solutions.?
Why do you need to overwrite your source image several times?
In any case, you can still rename your files after a process.
There is the process.
1. User should upload an image. Then user can see re sized image. (Ajax request)
2. User should select an area from the re sized image. Crop the image according to user's selection.
3. Then create another object. [$handle2->upload('path/to/local/file')] and apply cropped (step 2) image as a water mark
4. Then store in DB (file name only)
I have created 3 image objects ($handle1, $handle2, $handle3) to do this.
The image which on my server is static image. That image should be background image.Cropped image use as a watermark on the my image.
$handle= new upload("/home1/ribelzxxx/public_html/apps/xxxx/images/mergePhone.png");
When calling above statement will be deleted 'mergePhone.png' and renamed as 'mergePhone.png'. i want to keep 'mergePhone.png' in without rename. this image call every image processing.
Thank you Colin. It's working properly. Thank you very much for the suggestion.
But, there is a problem. Can i prevent copying as a new image to the server?
Malinga