Skip to content
Snippets Groups Projects
Commit d52a56e1 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

always crop when height is given

darcs-hash:20080516131348-7ad00-499fcf8660323913e0cff1fbf85d9ffb56ea113b.gz
parent a7ead82d
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,6 @@
$CACHE = calc_cache($_REQUEST['cache']);
$WIDTH = (int) $_REQUEST['w'];
$HEIGHT = (int) $_REQUEST['h'];
$CROP = (bool) $_REQUEST['crop'];
list($EXT,$MIME) = mimetype($MEDIA);
if($EXT === false){
$EXT = 'unknown';
......@@ -68,7 +67,7 @@
//handle image resizing/cropping
if((substr($MIME,0,5) == 'image') && $WIDTH){
if($CROP){
if($HEIGHT){
$FILE = get_cropped($FILE,$EXT,$WIDTH,$HEIGHT);
}else{
$FILE = get_resized($FILE,$EXT,$WIDTH,$HEIGHT);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment