mirror of
https://github.com/cyanfish/naps2.git
synced 2024-11-11 02:45:19 +03:00
Optimize thumbnail rendering for image edits
This commit is contained in:
parent
804832e93c
commit
7fc21eb7ab
@ -158,6 +158,12 @@ namespace NAPS2.WinForms
|
||||
{
|
||||
img.AddTransform(t);
|
||||
}
|
||||
// Optimize thumbnail rendering for the first (or only) image since we already have it loaded into memory
|
||||
if (img == Image)
|
||||
{
|
||||
var transformed = imageContext.PerformAllTransforms(new GdiImage(workingImage).Clone(), Transforms);
|
||||
img.SetThumbnail(imageContext.PerformTransform(transformed, new ThumbnailTransform(ConfigProvider.Get(c => c.ThumbnailSize))));
|
||||
}
|
||||
}
|
||||
}
|
||||
changeTracker.Made();
|
||||
|
Loading…
Reference in New Issue
Block a user