Resize - Ratio_Y Doesn't seem to work!

See all posts Reply

Resize - Ratio_Y Doesn't seem to work! new!
by Patrick, 14 years, 9 months ago
Hi Colin,

I am using
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
Re: Resize - Ratio_Y Doesn't seem to work! new!
by colin, 14 years, 9 months ago
Can you copy here the log produced by the class?Reply
Re: Resize - Ratio_Y Doesn't seem to work! new!
by Patrick, 14 years, 9 months ago
Hi Colin,

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.Reply
Re: Resize - Ratio_Y Doesn't seem to work! new!
by colin, 14 years, 9 months ago
You shouldn't have any distortion (unless your image is only a few pixels high/wide).

For the logs, just output $handle->log after calling process()Reply
Re: Resize - Ratio_Y Doesn't seem to work! new!
by Patrick, 14 years, 9 months ago
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