Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15341062
D19777.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
878 B
Referenced Files
None
Subscribers
None
D19777.diff
View Options
diff --git a/src/applications/macro/engine/PhabricatorMemeEngine.php b/src/applications/macro/engine/PhabricatorMemeEngine.php
--- a/src/applications/macro/engine/PhabricatorMemeEngine.php
+++ b/src/applications/macro/engine/PhabricatorMemeEngine.php
@@ -174,6 +174,15 @@
private function newAssetData(PhabricatorFile $template) {
$template_data = $template->loadFileData();
+ // When we aren't adding text, just return the data unmodified. This saves
+ // us from doing expensive stitching when we aren't actually making any
+ // changes to the image.
+ $above_text = $this->getAboveText();
+ $below_text = $this->getBelowText();
+ if (!strlen(trim($above_text)) && !strlen(trim($below_text))) {
+ return $template_data;
+ }
+
$result = $this->newImagemagickAsset($template, $template_data);
if ($result) {
return $result;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 10, 6:24 PM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7463191
Default Alt Text
D19777.diff (878 B)
Attached To
Mode
D19777: When `{meme ...}` embed has no text, just use the raw file data unmodified
Attached
Detach File
Event Timeline
Log In to Comment