diff options
Diffstat (limited to 'UVtools.Core/FileFormats/FileFormat.cs')
-rw-r--r-- | UVtools.Core/FileFormats/FileFormat.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/UVtools.Core/FileFormats/FileFormat.cs b/UVtools.Core/FileFormats/FileFormat.cs index 4d93ac7..442f0e6 100644 --- a/UVtools.Core/FileFormats/FileFormat.cs +++ b/UVtools.Core/FileFormats/FileFormat.cs @@ -15,6 +15,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Emgu.CV; +using Emgu.CV.CvEnum; using UVtools.Core.Extensions; using UVtools.Core.Operations; @@ -462,6 +463,15 @@ namespace UVtools.Core.FileFormats } } + public void SetThumbnail(int index, string filePath) + { + Thumbnails[index] = CvInvoke.Imread(filePath, ImreadModes.AnyColor); + if (Thumbnails[index].Size != ThumbnailsOriginalSize[index]) + { + CvInvoke.Resize(Thumbnails[index], Thumbnails[index], ThumbnailsOriginalSize[index]); + } + } + public virtual void Encode(string fileFullPath, OperationProgress progress = null) { FileFullPath = fileFullPath; |