mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 05:50:55 +01:00
Limit meme text height to half of the image
Test Plan: Looked at meme with short text. Reviewers: DeedyDas Reviewed By: DeedyDas CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D4632
This commit is contained in:
parent
a9fb828635
commit
bb74573117
1 changed files with 1 additions and 1 deletions
|
@ -228,7 +228,7 @@ final class PhabricatorImageTransformer {
|
||||||
$text_height = abs($bbox[3] - $bbox[5]);
|
$text_height = abs($bbox[3] - $bbox[5]);
|
||||||
$text_width = abs($bbox[0] - $bbox[2]);
|
$text_width = abs($bbox[0] - $bbox[2]);
|
||||||
return array(
|
return array(
|
||||||
"doesfit" => ($text_height * 1.05 <= imagesy($img)
|
"doesfit" => ($text_height * 1.05 <= imagesy($img) / 2
|
||||||
&& $text_width * 1.05 <= imagesx($img)),
|
&& $text_width * 1.05 <= imagesx($img)),
|
||||||
"txtwidth" => $text_width,
|
"txtwidth" => $text_width,
|
||||||
"txtheight" => $text_height,
|
"txtheight" => $text_height,
|
||||||
|
|
Loading…
Reference in a new issue