mirror of
https://github.com/Quackster/Minerva.git
synced 2025-06-29 21:07:45 +00:00
Fix badge-fill path
This commit is contained in:
parent
8e9e018d51
commit
7c528d8553
2 changed files with 4 additions and 14 deletions
2
Badger
2
Badger
|
@ -1 +1 @@
|
||||||
Subproject commit dcdad20582aea7897afad6e5baf8bc26e9b96b94
|
Subproject commit 93c8ae82c68b6fbd598a4aab878d1b1baa890180
|
|
@ -51,20 +51,10 @@ namespace Minerva.Controllers
|
||||||
var badge = GetFromServer.ParseBadgeData(badgeCode);
|
var badge = GetFromServer.ParseBadgeData(badgeCode);
|
||||||
//var avatar = new Avatar(figure, size, bodyDirection, headDirection, figuredataReader, action: action, gesture: gesture, headOnly: headOnly, frame: frame, carryDrink: carryDrink, cropImage: cropImage);
|
//var avatar = new Avatar(figure, size, bodyDirection, headDirection, figuredataReader, action: action, gesture: gesture, headOnly: headOnly, frame: frame, carryDrink: carryDrink, cropImage: cropImage);
|
||||||
|
|
||||||
if (badgeCode.EndsWith(".gif"))
|
var badgeData = badge.Render(gifEncoder: true, forceWhiteBackground: true);
|
||||||
{
|
|
||||||
var badgeData = badge.Render(gifEncoder: true);
|
|
||||||
|
|
||||||
if (badgeData != null)
|
if (badgeData != null)
|
||||||
return File(badgeData, "image/gif");
|
return File(badgeData, "image/gif");
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var badgeData = badge.Render(gifEncoder: false);
|
|
||||||
|
|
||||||
if (badgeData != null)
|
|
||||||
return File(badgeData, "image/png");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return StatusCode(403);
|
return StatusCode(403);
|
||||||
|
|
Loading…
Add table
Reference in a new issue