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 have build in the class to resize a images. But nog i have some images that don't have to be resized when they are smaller. What class variabel do i have to add to it the? I now have the following:
Either you use image_ratio_no_zoom_in, same as image_ratio, but won't resize if the source image is smaller than image_x x image_y (default: false)
$handle->image_ratio_no_zoom_in = true;
Or else, if you don't want to explicitely set image_y, you can read some variables before calling Process(), such as image_src_x, image_src_y and image_src_type and depending on the values, you do a resizing or not.Reply
But the file were not resized, the bigger file also! I echoed the value for $handle->image_src_x & $handle->image_src_y, both have 0 value. I remove assignment = 0 in the class, then the value is nothing.
Would you suggest anything I could do to solve this?Reply
I have build in the class to resize a images. But nog i have some images that don't have to be resized when they are smaller. What class variabel do i have to add to it the? I now have the following:
So what do i need to add to make sure that smaller images won't be resized to the image_x of 800?
Erwin
Or else, if you don't want to explicitely set image_y, you can read some variables before calling Process(), such as image_src_x, image_src_y and image_src_type and depending on the values, you do a resizing or not.
$handle->image_ratio_no_zoom_in = true;
but the smaller size were also resized.
So, I use your 2nd suggestion,
But the file were not resized, the bigger file also!
I echoed the value for $handle->image_src_x & $handle->image_src_y, both have 0 value. I remove assignment = 0 in the class, then the value is nothing.
Would you suggest anything I could do to solve this?