Skip to content

Commit

Permalink
Move CreateMemoryImage call to Upscale method
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrsuder committed Nov 9, 2019
1 parent 862fff6 commit e6c2c48
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions IEU.Core/IEU.cs
Original file line number Diff line number Diff line change
Expand Up @@ -893,13 +893,7 @@ async public Task Split(FileInfo[] inputFiles = null)

ResetDoneCounter();
SetTotalCounter(inputFiles.Length);
ReportProgress();

if (CreateMemoryImage)
{
Image image = Image.Black(MaxTileResolutionWidth, MaxTileResolutionHeight);
image.WriteToFile($"{LrPath}{DirectorySeparator}([000])000)_memory_helper_image.png");
}
ReportProgress();

await Task.Run(() => Parallel.ForEach(inputFiles, parallelOptions: new ParallelOptions() { MaxDegreeOfParallelism = maxConcurrency }, file =>
{
Expand Down Expand Up @@ -1547,6 +1541,12 @@ async public Task<bool> Upscale(bool NoWindow = false, Profile HotProfile = null
if (!directory.Exists)
directory.Create();

if (CreateMemoryImage)
{
Image image = Image.Black(MaxTileResolutionWidth, MaxTileResolutionHeight);
image.WriteToFile($"{LrPath}{DirectorySeparator}([000])000)_memory_helper_image.png");
}

Process process;
if (UseBasicSR)
process = await BasicSR_Test(NoWindow, HotProfile);
Expand Down

0 comments on commit e6c2c48

Please sign in to comment.