Removed old GetRectangle

RectangleIntersectMinimums
AddUserSecrets
This commit is contained in:
2023-06-19 21:33:04 -07:00
parent 2ff966d6b0
commit 8863fd763f
20 changed files with 328 additions and 498 deletions

View File

@ -140,12 +140,6 @@ public class D_Face
#pragma warning disable CA1416
private static (int width, int height) Get(string file)
{
using Bitmap source = new(file);
return new(source.Width, source.Height);
}
private PropertyItem GetPropertyItem(int id, string value)
{
PropertyItem result = (PropertyItem)_ConstructorInfo.Invoke(null);
@ -304,7 +298,6 @@ public class D_Face
{
List<LocationContainer<MetadataExtractor.Directory>> results = new();
string? json;
int width, height;
Location? location;
Rectangle? rectangle;
List<int> skip = new();
@ -327,14 +320,12 @@ public class D_Face
if (face.Location is not null && face.OutputResolution is not null)
continue;
json = Metadata.Models.Stateless.Methods.IMetadata.GetOutputResolution(locationContainer.Directories);
if (json is not null)
{
outputResolutionCheck = JsonSerializer.Deserialize<OutputResolution>(json);
if (outputResolutionCheck is not null && (outputResolutionCheck.Width != outputResolutionWidth || outputResolutionCheck.Height != outputResolutionHeight))
continue;
}
(width, height) = Get(locationContainer.File);
rectangle = Shared.Models.Stateless.Methods.ILocation.GetRectangle(height, ILocation.Digits, ILocation.Factor, locationContainer.NormalizedRectangle, outputResolutionHeight, outputResolutionWidth, width);
if (json is null)
continue;
outputResolutionCheck = JsonSerializer.Deserialize<OutputResolution>(json);
if (outputResolutionCheck is null || outputResolutionCheck.Width != outputResolutionWidth || outputResolutionCheck.Height != outputResolutionHeight)
continue;
rectangle = Shared.Models.Stateless.Methods.ILocation.GetRectangle(ILocation.Digits, locationContainer.NormalizedRectangle, outputResolutionCheck);
if (rectangle is null)
continue;
location = Shared.Models.Stateless.Methods.ILocation.GetLocation(outputResolutionHeight, rectangle.Value, outputResolutionWidth);