CMS MADE SIMPLE FORGE

SuperSizer

 

[#7096] 'Fit' doesn't work as expected

avatar
Created By: arnaud vincent (shekars)
Date Submitted: Fri Nov 04 04:55:05 -0400 2011

Assigned To: Jeremy Bass (jeremybass)
Version: 0.9.6
CMSMS Version: 1.10
Severity: Major
Resolution: Invalid
State: Open
Summary:
'Fit' doesn't work as expected
Detailed Description:
eg : I have a 400(W)x500(H) image, trying to fit it in a 100(w)x300(h) format
(as I set the parameters in the call).
The plugin creates a thumbnail by resizing the image by the height (because the
program notices that H>W), so it has a new height of 300, but then a width of
240, wich doesn't fit the demanded size !

In the code, the size_by is only determined by the comparison of W & H, whereas
it should be a comparison between the ratios W/H and w/h.


History

Comments
avatar
Date: 2011-11-04 05:24
Posted By: arnaud vincent (shekars)

The following code works fine :

$ratioI=$GIS[0]/$GIS[1];
$ratioF=$SS->w/$SS->h;
if($ratioI<$ratioF){
	$SS->size_by='H';
	$SS->size_mesure=$SS->h;
}else{
	$SS->size_by='W';
	$SS->size_mesure=$SS->w;
}			
      
avatar
Date: 2011-11-04 14:14
Posted By: Jeremy Bass (jeremybass)

Please use the fit param look to the wiki for the diferent options.  I will do
as you are wishing.
      
avatar
Date: 2011-11-04 14:16
Posted By: Jeremy Bass (jeremybass)

ha typo :D "I/It will do" get back if there is troubles but this wish has been
requested and use for over a year or so .. Cheers -Jeremy
      
Updates

Updated: 2011-11-04 14:15
state: Closed => Open

Updated: 2011-11-04 14:15
resolution_id: 5 => 9
state: Open => Closed

Updated: 2011-11-04 05:24
resolution_id: => 5