Function resize

See all posts Reply

Function resize new!
by Marcus Bulhosa, 16 years, 1 month ago
Please.

resize not function. i downloaded the last version. (class)
The file go to destiny but your dimensions (size) not changed.
The code is:
if ($handle->uploaded)  {
    $handle->image_resize = true;
    $handle->image_ratio_y = false;
    $handle->image_x = 760;
    $handle->image_y = 520;
    $handle->image_watermark = 'watermark.png';
    $handle->image_watermark_x = -10;
    $handle->image_watermark_y = -10;
    $handle->file_name_body_add = "_nome";
    $handle->mime_check = true;
    $handle->Process('imgsite/paredao/');

    $handle->image_resize = true;
    $handle->image_ratio_y = false;
    $handle->image_x = 350;
    $handle->image_y = 350;
    $handle->image_contrast = 10;
    $handle->jpeg_quality = 70;
    $handle->file_name_body_add = "_nome";
    $handle->Process('imgsite/paredao/thumbs/');

    if ($handle->processed)
etc...

someone can helpe me??

marcusReply
Re: Function resize new!
by colin, 16 years, 1 month ago
Can you paste here the log produced by the class?Reply
Re: Function resize new!
by marcus bulhosa, 16 years, 1 month ago
How i enable the LOG?? Or where i find it?Reply
Re: Function resize new!
by colin, 16 years, 1 month ago
After calling process(), add the following:
echo $handle->log;
Reply
Re: Function resize new!
by genti, 16 years, 1 month ago
i've got a problem too

resize works using the default value and some random value.. but not with all.

ex.
original filesize 1229*817
resized to 620*620 -> fail
resized to 120*100-> works

using this code
$new_w=intval($_REQUEST['w']);
$new_h=intval($_REQUEST['h']);
$EB['gnt']= new Upload($_FILES['tuUploadFile']);
if ($EB['gnt']->uploaded) {
  $EB['gnt']->image_resize         = true;
  $EB['gnt']->image_x              = $new_w;
  $EB['gnt']->image_y              = $new_h;
.........

help! :DReply
Re: Function resize new!
by colin, 16 years, 1 month ago
Can you provide me with the log from the class, for the two tests you did above, the one that works, and the one that fails?Reply