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.
I upload an image and scale them to one big image and one thumb (works fine)
After upload and resize I have same editing options, like rotate, add border and crop. This works fine when I do changes on both big image and thumb but give me problems when only one of them is changed.
I need to get $handle->process to be true on both images even if I don't change anything on one of them but I get no process at all. (eg I want copy unchanged image).
In log my script terminates with this: - no image processing wanted
Here is the logic, my problem occur when $borderact == 'small':
I upload an image and scale them to one big image and one thumb (works fine)
After upload and resize I have same editing options, like rotate, add border and crop.
This works fine when I do changes on both big image and thumb but give me problems when only one of them is changed.
I need to get $handle->process to be true on both images even if I don't change anything on one of them but I get no process at all. (eg I want copy unchanged image).
In log my script terminates with this:
- no image processing wanted
Here is the logic, my problem occur when $borderact == 'small':
$handle = new upload("$imgdir/image_resized.jpg", "sv_SE"); $handle->file_auto_rename = false; $handle->file_overwrite = true; $handle->file_new_name_body = 'image_resized'; if ($borderact == 'big' || $borderact == 'both'): // remove border action if ($act == 'noborder'): $handle->image_crop = 1; // add border action elseif ($act == 'border'): $handle->image_border = '1px'; $handle->image_border_color = '#000000'; endif; endif; $handle->process($imgdir); $width = $handle->image_dst_x; $height = $handle->image_dst_y;