diff options
Diffstat (limited to 'UVtools.GUI/Extensions/EmguExtensions.cs')
-rw-r--r-- | UVtools.GUI/Extensions/EmguExtensions.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/UVtools.GUI/Extensions/EmguExtensions.cs b/UVtools.GUI/Extensions/EmguExtensions.cs new file mode 100644 index 0000000..a736e2b --- /dev/null +++ b/UVtools.GUI/Extensions/EmguExtensions.cs @@ -0,0 +1,23 @@ +/* + * GNU AFFERO GENERAL PUBLIC LICENSE + * Version 3, 19 November 2007 + * Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + * Everyone is permitted to copy and distribute verbatim copies + * of this license document, but changing it is not allowed. + */ + +using Emgu.CV; +using Emgu.CV.Structure; +using SixLabors.ImageSharp; +using SixLabors.ImageSharp.PixelFormats; + +namespace UVtools.GUI.Extensions +{ + public static class EmguExtensions + { + public static Image<L8> ToImageSharpL8(this Image<Gray, byte> image) + { + return Image.LoadPixelData<L8>(image.Bytes, image.Width, image.Height); + } + } +} |