1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-22 21:40: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:
vrana 2013-01-24 17:37:20 -08:00
parent a9fb828635
commit bb74573117

View file

@ -228,7 +228,7 @@ final class PhabricatorImageTransformer {
$text_height = abs($bbox[3] - $bbox[5]);
$text_width = abs($bbox[0] - $bbox[2]);
return array(
"doesfit" => ($text_height * 1.05 <= imagesy($img)
"doesfit" => ($text_height * 1.05 <= imagesy($img) / 2
&& $text_width * 1.05 <= imagesx($img)),
"txtwidth" => $text_width,
"txtheight" => $text_height,