diff options
Diffstat (limited to 'UVtools.Core/Layer/LayerManager.cs')
-rw-r--r-- | UVtools.Core/Layer/LayerManager.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/UVtools.Core/Layer/LayerManager.cs b/UVtools.Core/Layer/LayerManager.cs index ad3e149..183a333 100644 --- a/UVtools.Core/Layer/LayerManager.cs +++ b/UVtools.Core/Layer/LayerManager.cs @@ -1343,6 +1343,16 @@ namespace UVtools.Core { var mat = CvInvoke.Imread(operation.Files[i], ImreadModes.Grayscale); uint layerIndex = (uint) (startIndex + i); + if (operation.MergeImages) + { + if (!(this[layerIndex] is null)) + { + using (var oldMat = this[layerIndex].LayerMat) + { + CvInvoke.Add(oldMat, mat, mat); + } + } + } this[layerIndex] = new Layer(layerIndex, mat); lock (progress.Mutex) |