Convert inline profile image transforms to new transformations
Summary: Ref T7707. Fixes T7879. Fixes T4406. When creating profile images: - Use the new transforms; - mark them as "profile" images so they're forced to the most-open policies. Test Plan: - Set restrictive default file policies. - Changed profile picture, project pictures, etc. Verified they were visible to logged-out users. - Registered via OAuth. - Updated a Conpherence thread image. - Browsed around looking for profile images, fixed sizing on everything I could find. Reviewers: chad, btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T7879, T7707, T4406 Differential Revision: https://secure.phabricator.com/D12821
This commit is contained in:
@@ -58,7 +58,7 @@ final class PhabricatorFileComposeController
|
||||
}
|
||||
|
||||
$root = dirname(phutil_get_library_root('phabricator'));
|
||||
$icon_file = $root.'/resources/sprite/projects_1x/'.$icon.'.png';
|
||||
$icon_file = $root.'/resources/sprite/projects_2x/'.$icon.'.png';
|
||||
$icon_data = Filesystem::readFile($icon_file);
|
||||
|
||||
|
||||
@@ -68,6 +68,7 @@ final class PhabricatorFileComposeController
|
||||
$data,
|
||||
array(
|
||||
'name' => 'project.png',
|
||||
'profile' => true,
|
||||
'canCDN' => true,
|
||||
));
|
||||
|
||||
@@ -325,10 +326,10 @@ final class PhabricatorFileComposeController
|
||||
$color_string = idx($map, $color, '#ff00ff');
|
||||
$color_const = hexdec(trim($color_string, '#'));
|
||||
|
||||
$canvas = imagecreatetruecolor(50, 50);
|
||||
$canvas = imagecreatetruecolor(100, 100);
|
||||
imagefill($canvas, 0, 0, $color_const);
|
||||
|
||||
imagecopy($canvas, $icon_img, 0, 0, 0, 0, 50, 50);
|
||||
imagecopy($canvas, $icon_img, 0, 0, 0, 0, 100, 100);
|
||||
|
||||
return PhabricatorImageTransformer::saveImageDataInAnyFormat(
|
||||
$canvas,
|
||||
|
||||
Reference in New Issue
Block a user