Closest is usable with
NamedDeterministicHashCodeIdAndFaceLocationIndex
This commit is contained in:
@ -291,8 +291,6 @@ public class C_Resize
|
||||
throw new NullReferenceException(nameof(item.ImageFileHolder));
|
||||
if (!imageResizes.ContainsKey(outputResolution))
|
||||
throw new Exception();
|
||||
if (string.IsNullOrEmpty(cResultsFullGroupDirectory))
|
||||
throw new NullReferenceException(nameof(cResultsFullGroupDirectory));
|
||||
int[] resize = imageResizes[outputResolution];
|
||||
int outputResolutionWidth = resize[_OutputResolutionWidthIndex];
|
||||
int outputResolutionHeight = resize[_OutputResolutionHeightIndex];
|
||||
@ -308,8 +306,6 @@ public class C_Resize
|
||||
throw new NullReferenceException(nameof(item.ImageFileHolder));
|
||||
if (item.ResizedFileHolder is null)
|
||||
throw new NullReferenceException(nameof(item.ResizedFileHolder));
|
||||
if (string.IsNullOrEmpty(cResultsFullGroupDirectory))
|
||||
throw new NullReferenceException(nameof(cResultsFullGroupDirectory));
|
||||
FileHolder fileHolder = item.ResizedFileHolder;
|
||||
if (!imageResizes.ContainsKey(outputResolution))
|
||||
throw new Exception();
|
||||
@ -433,26 +429,20 @@ public class C_Resize
|
||||
throw new NullReferenceException(nameof(item.Property.Id));
|
||||
if (item.ImageFileHolder is null)
|
||||
throw new NullReferenceException(nameof(item.ImageFileHolder));
|
||||
if (string.IsNullOrEmpty(cResultsFullGroupDirectory))
|
||||
throw new NullReferenceException(nameof(cResultsFullGroupDirectory));
|
||||
string json;
|
||||
string[] changesFrom = new string[] { nameof(A_Property), nameof(B_Metadata) };
|
||||
List<DateTime> dateTimes = (from l in subFileTuples where changesFrom.Contains(l.Item1) select l.Item2).ToList();
|
||||
FileInfo fileInfo = new(Path.Combine(AngleBracketCollection[0].Replace("<>", "{}"), string.Concat(item.ImageFileHolder.NameWithoutExtension, ".json")));
|
||||
string cResizeSingletonFile = Path.Combine(cResultsFullGroupDirectory, "{}", "_ _ _", $"{item.Property.Id.Value}{item.ImageFileHolder.ExtensionLowered}.json");
|
||||
if (fileInfo.Exists)
|
||||
string usingRelativePath = Path.Combine(AngleBracketCollection[0].Replace("<>", "{}"), string.Concat(item.ImageFileHolder.NameWithoutExtension, ".json"));
|
||||
string cResizeSingletonFile = Path.Combine(cResultsFullGroupDirectory, "{}", Property.Models.Stateless.IResult.AllInOne, $"{item.Property.Id.Value}{item.ImageFileHolder.ExtensionLowered}.json");
|
||||
FileInfo fileInfo = new(cResizeSingletonFile);
|
||||
if (!fileInfo.Exists)
|
||||
{
|
||||
if (!File.Exists(cResizeSingletonFile))
|
||||
if (File.Exists(usingRelativePath))
|
||||
{
|
||||
fileInfo.MoveTo(cResizeSingletonFile);
|
||||
fileInfo = new(cResizeSingletonFile);
|
||||
File.Move(usingRelativePath, fileInfo.FullName);
|
||||
fileInfo.Refresh();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (File.Exists(cResizeSingletonFile))
|
||||
fileInfo = new(cResizeSingletonFile);
|
||||
else
|
||||
if (!fileInfo.Exists)
|
||||
{
|
||||
if (fileInfo.Directory?.Parent is null)
|
||||
throw new Exception();
|
||||
|
Reference in New Issue
Block a user