mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 13:33:27 -07:00
Made the supported image formats extendable, and supplied a SVG implementation right away with the jira addon.
This commit is contained in:
parent
9bf9c0e4e6
commit
fc192827f1
21 changed files with 1354 additions and 676 deletions
|
@ -23,9 +23,13 @@ using System.Windows.Forms;
|
|||
using Greenshot.IniFile;
|
||||
using Greenshot.Plugin;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Threading.Tasks;
|
||||
using Dapplo.Log.Facade;
|
||||
using GreenshotJiraPlugin.Forms;
|
||||
using GreenshotPlugin.Core;
|
||||
using Svg;
|
||||
|
||||
namespace GreenshotJiraPlugin {
|
||||
/// <summary>
|
||||
|
@ -95,6 +99,21 @@ namespace GreenshotJiraPlugin {
|
|||
_config = IniConfig.GetIniSection<JiraConfiguration>();
|
||||
LogSettings.RegisterDefaultLogger<Log4NetLogger>();
|
||||
|
||||
// Add a SVG converter, although it doesn't fit to the Jira plugin there is currently no other way
|
||||
ImageHelper.StreamConverters["svg"] = (stream, s) =>
|
||||
{
|
||||
stream.Position = 0;
|
||||
try
|
||||
{
|
||||
return SvgImage.FromStream(stream).Image;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error("Can't load SVG", ex);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue