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 am afraid you need to try harder. Instead of outputing the image in the browser, try first to output it on disk, and check the logs produced by the class (output $handle->log). Once it works on disk, output the image in the browserReply
i mean, i use code base on that code, but not working.
here my code
include('lib/class.upload.php'); $file = "image.jpg"; $files = "new-image.jpg"; $handle = new upload($file); if ($handle->uploaded) { if ($handle->processed) { $handle->file_new_name_body = $files; $handle->image_resize = true; $handle->image_y = 400; $handle->image_ratio_x = true; header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename='.basename($files)); $handle->process("$file"); echo $handle->Process(); die(); } else { echo 'error : ' . $handle->error; } }that code download same image as original without modification.
I just create that one page only, load image from local file, not upload file. and modified with that amazing class.
i just create that one page, and running to tested force download.
or maybe i miss something?
include('lib/class.upload.php'); $file = "image.jpg"; $files = "new-image.jpg"; $handle = new upload($file); if ($handle->uploaded) { $handle->file_new_name_body = $files; $handle->image_resize = true; $handle->image_y = 400; $handle->image_ratio_x = true; header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename='.basename($files)); echo $handle->process(); die(); } else { echo 'error : ' . $handle->error; }thanks for your support, i will update when success.
anyway.. you create great class upload, i use in other handle and it's amazing.
thanks
Ray