Model changes for Unit Test Face
This commit is contained in:
@ -104,14 +104,14 @@ public class UnitTestResize
|
||||
throw new Exception($"{nameof(_Configuration.PropertiesChangedForResize)} is null!");
|
||||
int g = 1;
|
||||
int r = 1;
|
||||
Model model = Model.Hog;
|
||||
Model? model = null;
|
||||
string original = "Original";
|
||||
List<string> parseExceptions = new();
|
||||
Property.Models.A_Property? property = null;
|
||||
Property.Models.PropertyHolder propertyHolder;
|
||||
Dictionary<string, int[]> imageResizeKeyValuePairs;
|
||||
List<Tuple<string, DateTime>> subFileTuples = new();
|
||||
PredictorModel predictorModel = PredictorModel.Large;
|
||||
PredictorModel? predictorModel = null;
|
||||
List<KeyValuePair<string, string>> metadataCollection;
|
||||
int length = _PropertyConfiguration.RootDirectory.Length;
|
||||
string outputResolution = _Configuration.OutputResolutions[0];
|
||||
@ -162,14 +162,14 @@ public class UnitTestResize
|
||||
string relativePath = Property.Models.Stateless.IPath.GetRelativePath(fileInfo.FullName, length);
|
||||
sourceDirectory = Path.Combine(aPropertySingletonDirectory, sourceDirectoryName);
|
||||
propertyHolder = new(g, sourceDirectory, sourceDirectoryFile, relativePath, r, fileInfo, property, false, false, null, null, null);
|
||||
if (propertyHolder.ImageFileInfo is null)
|
||||
throw new Exception($"{nameof(propertyHolder.ImageFileInfo)} is null!");
|
||||
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(propertyHolder.ImageFileInfo.FullName);
|
||||
Assert.IsNotNull(propertyHolder.ImageFileInfo);
|
||||
property = propertyLogic.GetProperty(propertyLogic.AngleBracketCollection[0], propertyHolder, subFileTuples, parseExceptions);
|
||||
(int _, metadataCollection) = metadata.GetMetadataCollection(subFileTuples, parseExceptions, propertyHolder.ImageFileInfo.FullName, propertyHolder.RelativePath, fileNameWithoutExtension);
|
||||
imageResizeKeyValuePairs = resize.GetResizeKeyValuePairs(subFileTuples, parseExceptions, original, metadataCollection, property, propertyHolder.ImageFileInfo.FullName, propertyHolder.RelativePath, fileNameWithoutExtension);
|
||||
(int _, metadataCollection) = metadata.GetMetadataCollection(subFileTuples, parseExceptions, propertyHolder);
|
||||
imageResizeKeyValuePairs = resize.GetResizeKeyValuePairs(subFileTuples, parseExceptions, original, metadataCollection, property, propertyHolder);
|
||||
FileInfo resizedFileInfo = new(Path.Combine(resize.AngleBracketCollection[0].Replace("<>", "()"), Path.GetFileName(propertyHolder.ImageFileInfo.FullName)));
|
||||
resize.SaveResizedSubfile(outputResolution, subFileTuples, propertyHolder.ImageFileInfo.FullName, original, property, imageResizeKeyValuePairs, resizedFileInfo);
|
||||
propertyHolder.SetResizedFileInfo(resizedFileInfo);
|
||||
resize.SaveResizedSubfile(outputResolution, subFileTuples, propertyHolder, original, property, imageResizeKeyValuePairs);
|
||||
resizedFileInfo.Refresh();
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user