Reply to Problem with image_dst_x and image_dst_y

Problem with image_dst_x and image_dst_y new!
by Erdem, 14 years, 10 months ago
Hi Colin,
After upgrading from 0.25 to 0.28 I can't get image_dst_x and image_dst_y variables. It returns 0 for both.

My code:
$U = new upload($file);
$U->allowed = array("image/*");
$U->file_new_name_body =substr(md5(uniqid(rand(), true)),0,16);
if($resize) {
  $U->image_resize  = true;
  $U->image_ratio_crop = true;
  $U->image_x = $width;
  $U->image_y = $height;
  $U->image_ratio_no_zoom_in = true;
}
$U->file_overwrite = false;
$U->file_auto_rename = true;
$U->process($uploaddir);
if ($U->processed) {
  $width = $U->image_dst_x;
  $height = $U->image_dst_y;
  $name = $U->file_dst_name;
  $U->file_new_name_body = $U->file_dst_name_body.'_100x100';
  $U->image_resize  = true;
  $U->image_ratio_crop = true;
  $U->image_x = 100;
  $U->image_y = 100;
  $U->image_ratio_no_zoom_in = true;
  $U->process($uploaddir);
  if($U->processed) {
    // more stuff
Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important