Skip to content

Commit 4a76771

Browse files
authored
Update ImageResize.php
1 parent d4c41f4 commit 4a76771

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/ImageResize.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class ImageResize
1313
const CROPBOTTOM = 3;
1414
const CROPLEFT = 4;
1515
const CROPRIGHT = 5;
16+
const CROPTOPCENTER = 6;
1617

1718
public $quality_jpg = 85;
1819
public $quality_png = 6;
@@ -522,6 +523,10 @@ protected function getCropPosition($expectedSize, $position = self::CROPCENTER)
522523
case self::CROPCENTRE:
523524
$size = $expectedSize / 2;
524525
break;
526+
527+
case self::CROPTOPCENTER:
528+
$size = $expectedSize / 4;
529+
break;
525530
}
526531
return $size;
527532
}

0 commit comments

Comments
 (0)