Home arrow Forum
Home
About
Demo
Forum
FAQ
Live Sites
Feedback

Login





Lost Password?
No account yet? Register
Stay Tuned!
 
Who's Online
We have 4 guests and 2 members online

powered_by Joomla
ME Forum
Welcome, Guest
Please Login or Register.    Lost Password?
image resize problem (squeeze) (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: image resize problem (squeeze)
#3419
fallen (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
image resize problem (squeeze) 1 Year ago Karma: 0  
Hello,
when resizing images, they are not correctly resized they got squeezed and look stretched out.

here is the code to be replaced:
com_estateagent/includes/gallery/upload.gallery.php

code to be edited:
Code:

if($prop == 1) { $ratio = $srcWidth / $width; #$ratio = max($srcWidth, $srcHeight) / $new_size; $ratio = max($ratio, 1.0); $destWidth = (int)($srcWidth / $ratio); $destHeight = (int)($srcHeight / $ratio); } else{ $destWidth = (int)($width); $destHeight = (int)($height); }
to the following:
Code:

if($prop == 1) { $thumb_height = $height; $thumb_width = $width; if ($imginfo[0] < $imginfo[1]) // width < height { $destWidth = intval($thumb_height * ($imginfo[0] / $imginfo[1])) ; $destHeight = $thumb_height; } else if ($imginfo[0] > $imginfo[1]) { $destHeight = intval($thumb_width * ($imginfo[1] / $imginfo[0])); $destWidth = $thumb_width; } else { if ($thumb_width < $thumb_height) { $destHeight = intval($thumb_width * ($imginfo[1] / $imginfo[0])); $destWidth = $thumb_width; } else { $destWidth = intval($thumb_height * ($imginfo[0] / $imginfo[1])) ; $destHeight = $thumb_height; } } } else { $destWidth = (int)($width); $destHeight = (int)($height); }
hope that helps to someone else or even be implemented in the next release...
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#3421
yankee (User)
Junior Boarder
Posts: 27
graphgraph
User Offline Click here to see the profile of this user
Re:image resize problem (squeeze) 1 Year ago Karma: 0  
Hello fallen.

I have problem with stretching. When I set up "horizontal" ratio, and trying to upload "vertical" picture, that picture is squeezed.

Changing this code didn't help.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#3435
admin (Admin)
Admin
Posts: 562
graph
User Offline Click here to see the profile of this user
Gender: Male MisterEstate Location: South Germany
Re:image resize problem (squeeze) 1 Year ago Karma: 32  
will check and fix it. please show a little patience.
 
Report to moderator   Logged Logged  
 
kindly regards / beste Gruesse

Admin
  The administrator has disabled public write access.
#3436
yankee (User)
Junior Boarder
Posts: 27
graphgraph
User Offline Click here to see the profile of this user
Re:image resize problem (squeeze) 1 Year ago Karma: 0  
Thanks. Just to let you know that I performed tests all long morning, different servers, different installations, and newest ME bundle...
Unfortunately, result was the same...
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#3988
satya (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Re:image resize problem (squeeze) 10 Months, 2 Weeks ago Karma: 0  
I have the same problem with streched photos in ME. Not that I want to rush admin, ince it is two months from last post on this topic. It is rather a humble cry for help
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4027
admin (Admin)
Admin
Posts: 562
graph
User Offline Click here to see the profile of this user
Gender: Male MisterEstate Location: South Germany
Re:image resize problem (squeeze) 10 Months, 1 Week ago Karma: 32  
youŽll have to fill in both - height and width of your pictures. then it should work.
 
Report to moderator   Logged Logged  
 
kindly regards / beste Gruesse

Admin
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop