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.
if ($handle->uploaded)
{ // OK - the temporary file has arrived on the server
$handle->file_new_name_body = $new_pic_name;
$handle->image_resize = true;
$handle->image_ratio_y = true;
$handle->image_x = 450;
$handle->allowed = array('image/*');
very similar to your example but the picture ratio when loaded is not correct - it appears squashed in the vertical - any ideas?
Regards. Patrick. PS. I've downloaded the latest version 0.29.Reply
I'm not sure if I have a problem or not - switching between the loaded image and the original gives the impression that there is something not quite right but if I look at the loaded image long enough I can convince myself it is ok - if there is a distortion it is pretty subtle (this is for a pic wider on the x-axis). For a pic wider on the y-axis it looks very distorted but looking at the forum it has become clear that I need to add a few more lines of code to deal with that situation.
Would you expect a degree of distortion in the first scenario?
Very sorry Colin - I had length and width fixed in my HTML (I had cut and paste from another script) ... very sorry to have wasted your time. Regards. Patrick.Reply
I am using
very similar to your example but the picture ratio when loaded is not correct - it appears squashed in the vertical - any ideas?
Regards.
Patrick.
PS. I've downloaded the latest version 0.29.
I'm not sure if I have a problem or not - switching between the loaded image and the original gives the impression that there is something not quite right but if I look at the loaded image long enough I can convince myself it is ok - if there is a distortion it is pretty subtle (this is for a pic wider on the x-axis). For a pic wider on the y-axis it looks very distorted but looking at the forum it has become clear that I need to add a few more lines of code to deal with that situation.
Would you expect a degree of distortion in the first scenario?
Where do I get the log from?
Regards.
Patrick.
For the logs, just output $handle->log after calling process()
Regards.
Patrick.