Metadata
This commit is contained in:
@ -3,20 +3,20 @@ using System.Text.Json.Serialization;
|
||||
|
||||
namespace View_by_Distance.Shared.Models;
|
||||
|
||||
public record ExifDirectory(AviDirectory AviDirectory,
|
||||
ExifDirectoryBase ExifDirectoryBase,
|
||||
string File,
|
||||
FileMetadataDirectory FileMetadataDirectory,
|
||||
GifHeaderDirectory GifHeaderDirectory,
|
||||
GpsDirectory GpsDirectory,
|
||||
public record ExifDirectory(AviDirectory[] AviDirectories,
|
||||
ExifDirectoryBase[] ExifBaseDirectories,
|
||||
FileMetadataDirectory[] FileMetadataDirectories,
|
||||
GifHeaderDirectory[] GifHeaderDirectories,
|
||||
GpsDirectory[] GpsDirectories,
|
||||
int? Height,
|
||||
string JsonFile,
|
||||
JpegDirectory JpegDirectory,
|
||||
PhotoshopDirectory PhotoshopDirectory,
|
||||
PngDirectory PngDirectory,
|
||||
QuickTimeMovieHeaderDirectory QuickTimeMovieHeaderDirectory,
|
||||
QuickTimeTrackHeaderDirectory QuickTimeTrackHeaderDirectory,
|
||||
WebPDirectory WebPDirectory,
|
||||
JpegDirectory[] JpegDirectories,
|
||||
MakernoteDirectory[] MakernoteDirectories,
|
||||
string OriginalFileName,
|
||||
PhotoshopDirectory[] PhotoshopDirectories,
|
||||
PngDirectory[] PngDirectories,
|
||||
QuickTimeMovieHeaderDirectory[] QuickTimeMovieHeaderDirectories,
|
||||
QuickTimeTrackHeaderDirectory[] QuickTimeTrackHeaderDirectories,
|
||||
WebPDirectory[] WebPDirectories,
|
||||
int? Width)
|
||||
{
|
||||
|
||||
@ -28,7 +28,7 @@ public record ExifDirectory(AviDirectory AviDirectory,
|
||||
|
||||
}
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
[JsonSerializable(typeof(ExifDirectory))]
|
||||
public partial class ExifDirectorySourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
|
@ -2,14 +2,14 @@ using System.Drawing;
|
||||
|
||||
namespace View_by_Distance.Shared.Models;
|
||||
|
||||
public record LocationContainer<T>(DateOnly CreationDateOnly,
|
||||
IReadOnlyList<T> Directories,
|
||||
int? DirectoryNumber,
|
||||
string DisplayDirectoryName,
|
||||
FilePath FilePath,
|
||||
bool FromDistanceContent,
|
||||
int Id,
|
||||
Location? Location,
|
||||
long PersonKey,
|
||||
RectangleF? Rectangle,
|
||||
int WholePercentages);
|
||||
public record LocationContainer(DateOnly CreationDateOnly,
|
||||
ExifDirectory? ExifDirectory,
|
||||
int? DirectoryNumber,
|
||||
string DisplayDirectoryName,
|
||||
FilePath FilePath,
|
||||
bool FromDistanceContent,
|
||||
int Id,
|
||||
Location? Location,
|
||||
long PersonKey,
|
||||
RectangleF? Rectangle,
|
||||
int WholePercentages);
|
23
Shared/Models/MakernoteDirectory.cs
Normal file
23
Shared/Models/MakernoteDirectory.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace View_by_Distance.Shared.Models;
|
||||
|
||||
public record MakernoteDirectory(string? CameraSerialNumber,
|
||||
string? FirmwareVersion,
|
||||
string? QualityAndFileFormat)
|
||||
{
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
string result = JsonSerializer.Serialize(this, MakernoteDirectorySourceGenerationContext.Default.MakernoteDirectory);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
[JsonSerializable(typeof(MakernoteDirectory))]
|
||||
public partial class MakernoteDirectorySourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
@ -2,9 +2,9 @@ using System.Collections.ObjectModel;
|
||||
|
||||
namespace View_by_Distance.Shared.Models.Methods;
|
||||
|
||||
public interface IDistance<T>
|
||||
public interface IDistance
|
||||
{
|
||||
|
||||
ReadOnlyCollection<RelationContainer> GetRelationContainers(int faceDistancePermyriad, int locationContainerDistanceTake, float locationContainerDistanceTolerance, ReadOnlyCollection<LocationContainer<T>> locationContainers);
|
||||
ReadOnlyCollection<RelationContainer> GetRelationContainers(int faceDistancePermyriad, int locationContainerDistanceTake, float locationContainerDistanceTolerance, ReadOnlyCollection<LocationContainer> locationContainers);
|
||||
|
||||
}
|
@ -4,7 +4,8 @@ using System.Text.Json.Serialization;
|
||||
namespace View_by_Distance.Shared.Models;
|
||||
|
||||
public record PngDirectory(string? ImageHeight,
|
||||
string? ImageWidth)
|
||||
string? ImageWidth,
|
||||
string? TextualData)
|
||||
{
|
||||
|
||||
public override string ToString()
|
||||
|
@ -1,148 +1,148 @@
|
||||
namespace View_by_Distance.Shared.Models.Stateless;
|
||||
// namespace View_by_Distance.Shared.Models.Stateless;
|
||||
|
||||
public interface IExif
|
||||
{
|
||||
// public interface IExif
|
||||
// {
|
||||
|
||||
enum Tags : ushort
|
||||
{
|
||||
GPSVersionID = 0,
|
||||
GPSLatitudeRef = 1,
|
||||
GPSLatitude = 2,
|
||||
GPSLongitudeRef = 3,
|
||||
GPSLongitude = 4,
|
||||
GPSAltitudeRef = 5,
|
||||
GPSAltitude = 6,
|
||||
GPSTimestamp = 7,
|
||||
GPSSatellites = 8,
|
||||
GPSStatus = 9,
|
||||
GPSMeasureMode = 10,
|
||||
GPSDOP = 11,
|
||||
GPSSpeedRef = 12,
|
||||
GPSSpeed = 13,
|
||||
GPSTrackRef = 14,
|
||||
GPSTrack = 15,
|
||||
GPSImgDirectionRef = 16,
|
||||
GPSImgDirection = 17,
|
||||
GPSMapDatum = 18,
|
||||
GPSDestLatitudeRef = 19,
|
||||
GPSDestLatitude = 20,
|
||||
GPSDestLongitudeRef = 21,
|
||||
GPSDestLongitude = 22,
|
||||
GPSDestBearingRef = 23,
|
||||
GPSDestBearing = 24,
|
||||
GPSDestDistanceRef = 25,
|
||||
GPSDestDistance = 26,
|
||||
GPSProcessingMethod = 27,
|
||||
GPSAreaInformation = 28,
|
||||
GPSDateStamp = 29,
|
||||
GPSDifferential = 30,
|
||||
GPSHPositioningError = 31,
|
||||
ImageWidth = 256,
|
||||
ImageLength = 257,
|
||||
BitsPerSample = 258,
|
||||
Compression = 259,
|
||||
PhotometricInterpretation = 262,
|
||||
ImageDescription = 270,
|
||||
Make = 271,
|
||||
Model = 272,
|
||||
StripOffsets = 273,
|
||||
Orientation = 274,
|
||||
SamplesPerPixel = 277,
|
||||
RowsPerStrip = 278,
|
||||
StripByteCounts = 279,
|
||||
XResolution = 282,
|
||||
YResolution = 283,
|
||||
PlanarConfiguration = 284,
|
||||
ResolutionUnit = 296,
|
||||
TransferFunction = 301,
|
||||
Software = 305,
|
||||
DateTime = 306,
|
||||
Artist = 315,
|
||||
WhitePoint = 318,
|
||||
PrimaryChromaticities = 319,
|
||||
JPEGInterchangeFormat = 513,
|
||||
JPEGInterchangeFormatLength = 514,
|
||||
YCbCrCoefficients = 529,
|
||||
YCbCrSubSampling = 530,
|
||||
YCbCrPositioning = 531,
|
||||
ReferenceBlackWhite = 532,
|
||||
Copyright = 33432,
|
||||
ExposureTime = 33434,
|
||||
FNumber = 33437,
|
||||
ExposureProgram = 34850,
|
||||
SpectralSensitivity = 34852,
|
||||
ISOSpeedRatings = 34855,
|
||||
#pragma warning disable CA1069
|
||||
PhotographicSensitivity = 34855,
|
||||
#pragma warning restore CA1069
|
||||
OECF = 34856,
|
||||
SensitivityType = 34864,
|
||||
StandardOutputSensitivity = 34865,
|
||||
RecommendedExposureIndex = 34866,
|
||||
ISOSpeed = 34867,
|
||||
ISOSpeedLatitudeyyy = 34868,
|
||||
ISOSpeedLatitudezzz = 34869,
|
||||
ExifVersion = 36864,
|
||||
DateTimeOriginal = 36867,
|
||||
DateTimeDigitized = 36868,
|
||||
ComponentsConfiguration = 37121,
|
||||
CompressedBitsPerPixel = 37122,
|
||||
ShutterSpeedValue = 37377,
|
||||
ApertureValue = 37378,
|
||||
BrightnessValue = 37379,
|
||||
ExposureBiasValue = 37380,
|
||||
MaxApertureValue = 37381,
|
||||
SubjectDistance = 37382,
|
||||
MeteringMode = 37383,
|
||||
LightSource = 37384,
|
||||
Flash = 37385,
|
||||
FocalLength = 37386,
|
||||
SubjectArea = 37396,
|
||||
MakerNote = 37500,
|
||||
UserComment = 37510,
|
||||
SubsecTime = 37520,
|
||||
SubsecTimeOriginal = 37521,
|
||||
SubsecTimeDigitized = 37522,
|
||||
XPTitle = 40091,
|
||||
XPComment = 40092,
|
||||
XPAuthor = 40093,
|
||||
XPKeywords = 40094,
|
||||
XPSubject = 40095,
|
||||
FlashpixVersion = 40960,
|
||||
ColorSpace = 40961,
|
||||
PixelXDimension = 40962,
|
||||
PixelYDimension = 40963,
|
||||
RelatedSoundFile = 40964,
|
||||
FlashEnergy = 41483,
|
||||
SpatialFrequencyResponse = 41484,
|
||||
FocalPlaneXResolution = 41486,
|
||||
FocalPlaneYResolution = 41487,
|
||||
FocalPlaneResolutionUnit = 41488,
|
||||
SubjectLocation = 41492,
|
||||
ExposureIndex = 41493,
|
||||
SensingMethod = 41495,
|
||||
FileSource = 41728,
|
||||
SceneType = 41729,
|
||||
CFAPattern = 41730,
|
||||
CustomRendered = 41985,
|
||||
ExposureMode = 41986,
|
||||
WhiteBalance = 41987,
|
||||
DigitalZoomRatio = 41988,
|
||||
FocalLengthIn35mmFilm = 41989,
|
||||
SceneCaptureType = 41990,
|
||||
GainControl = 41991,
|
||||
Contrast = 41992,
|
||||
Saturation = 41993,
|
||||
Sharpness = 41994,
|
||||
DeviceSettingDescription = 41995,
|
||||
SubjectDistanceRange = 41996,
|
||||
ImageUniqueID = 42016,
|
||||
CameraOwnerName = 42032,
|
||||
BodySerialNumber = 42033,
|
||||
LensSpecification = 42034,
|
||||
LensMake = 42035,
|
||||
LensModel = 42036,
|
||||
LensSerialNumber = 42037
|
||||
}
|
||||
// enum Tags : ushort
|
||||
// {
|
||||
// GPSVersionID = 0,
|
||||
// GPSLatitudeRef = 1,
|
||||
// GPSLatitude = 2,
|
||||
// GPSLongitudeRef = 3,
|
||||
// GPSLongitude = 4,
|
||||
// GPSAltitudeRef = 5,
|
||||
// GPSAltitude = 6,
|
||||
// GPSTimestamp = 7,
|
||||
// GPSSatellites = 8,
|
||||
// GPSStatus = 9,
|
||||
// GPSMeasureMode = 10,
|
||||
// GPSDOP = 11,
|
||||
// GPSSpeedRef = 12,
|
||||
// GPSSpeed = 13,
|
||||
// GPSTrackRef = 14,
|
||||
// GPSTrack = 15,
|
||||
// GPSImgDirectionRef = 16,
|
||||
// GPSImgDirection = 17,
|
||||
// GPSMapDatum = 18,
|
||||
// GPSDestLatitudeRef = 19,
|
||||
// GPSDestLatitude = 20,
|
||||
// GPSDestLongitudeRef = 21,
|
||||
// GPSDestLongitude = 22,
|
||||
// GPSDestBearingRef = 23,
|
||||
// GPSDestBearing = 24,
|
||||
// GPSDestDistanceRef = 25,
|
||||
// GPSDestDistance = 26,
|
||||
// GPSProcessingMethod = 27,
|
||||
// GPSAreaInformation = 28,
|
||||
// GPSDateStamp = 29,
|
||||
// GPSDifferential = 30,
|
||||
// GPSHPositioningError = 31,
|
||||
// ImageWidth = 256,
|
||||
// ImageLength = 257,
|
||||
// BitsPerSample = 258,
|
||||
// Compression = 259,
|
||||
// PhotometricInterpretation = 262,
|
||||
// ImageDescription = 270,
|
||||
// Make = 271,
|
||||
// Model = 272,
|
||||
// StripOffsets = 273,
|
||||
// Orientation = 274,
|
||||
// SamplesPerPixel = 277,
|
||||
// RowsPerStrip = 278,
|
||||
// StripByteCounts = 279,
|
||||
// XResolution = 282,
|
||||
// YResolution = 283,
|
||||
// PlanarConfiguration = 284,
|
||||
// ResolutionUnit = 296,
|
||||
// TransferFunction = 301,
|
||||
// Software = 305,
|
||||
// DateTime = 306,
|
||||
// Artist = 315,
|
||||
// WhitePoint = 318,
|
||||
// PrimaryChromaticities = 319,
|
||||
// JPEGInterchangeFormat = 513,
|
||||
// JPEGInterchangeFormatLength = 514,
|
||||
// YCbCrCoefficients = 529,
|
||||
// YCbCrSubSampling = 530,
|
||||
// YCbCrPositioning = 531,
|
||||
// ReferenceBlackWhite = 532,
|
||||
// Copyright = 33432,
|
||||
// ExposureTime = 33434,
|
||||
// FNumber = 33437,
|
||||
// ExposureProgram = 34850,
|
||||
// SpectralSensitivity = 34852,
|
||||
// ISOSpeedRatings = 34855,
|
||||
// #pragma warning disable CA1069
|
||||
// PhotographicSensitivity = 34855,
|
||||
// #pragma warning restore CA1069
|
||||
// OECF = 34856,
|
||||
// SensitivityType = 34864,
|
||||
// StandardOutputSensitivity = 34865,
|
||||
// RecommendedExposureIndex = 34866,
|
||||
// ISOSpeed = 34867,
|
||||
// ISOSpeedLatitudeyyy = 34868,
|
||||
// ISOSpeedLatitudezzz = 34869,
|
||||
// ExifVersion = 36864,
|
||||
// DateTimeOriginal = 36867,
|
||||
// DateTimeDigitized = 36868,
|
||||
// ComponentsConfiguration = 37121,
|
||||
// CompressedBitsPerPixel = 37122,
|
||||
// ShutterSpeedValue = 37377,
|
||||
// ApertureValue = 37378,
|
||||
// BrightnessValue = 37379,
|
||||
// ExposureBiasValue = 37380,
|
||||
// MaxApertureValue = 37381,
|
||||
// SubjectDistance = 37382,
|
||||
// MeteringMode = 37383,
|
||||
// LightSource = 37384,
|
||||
// Flash = 37385,
|
||||
// FocalLength = 37386,
|
||||
// SubjectArea = 37396,
|
||||
// MakerNote = 37500,
|
||||
// UserComment = 37510,
|
||||
// SubsecTime = 37520,
|
||||
// SubsecTimeOriginal = 37521,
|
||||
// SubsecTimeDigitized = 37522,
|
||||
// XPTitle = 40091,
|
||||
// XPComment = 40092,
|
||||
// XPAuthor = 40093,
|
||||
// XPKeywords = 40094,
|
||||
// XPSubject = 40095,
|
||||
// FlashpixVersion = 40960,
|
||||
// ColorSpace = 40961,
|
||||
// PixelXDimension = 40962,
|
||||
// PixelYDimension = 40963,
|
||||
// RelatedSoundFile = 40964,
|
||||
// FlashEnergy = 41483,
|
||||
// SpatialFrequencyResponse = 41484,
|
||||
// FocalPlaneXResolution = 41486,
|
||||
// FocalPlaneYResolution = 41487,
|
||||
// FocalPlaneResolutionUnit = 41488,
|
||||
// SubjectLocation = 41492,
|
||||
// ExposureIndex = 41493,
|
||||
// SensingMethod = 41495,
|
||||
// FileSource = 41728,
|
||||
// SceneType = 41729,
|
||||
// CFAPattern = 41730,
|
||||
// CustomRendered = 41985,
|
||||
// ExposureMode = 41986,
|
||||
// WhiteBalance = 41987,
|
||||
// DigitalZoomRatio = 41988,
|
||||
// FocalLengthIn35mmFilm = 41989,
|
||||
// SceneCaptureType = 41990,
|
||||
// GainControl = 41991,
|
||||
// Contrast = 41992,
|
||||
// Saturation = 41993,
|
||||
// Sharpness = 41994,
|
||||
// DeviceSettingDescription = 41995,
|
||||
// SubjectDistanceRange = 41996,
|
||||
// ImageUniqueID = 42016,
|
||||
// CameraOwnerName = 42032,
|
||||
// BodySerialNumber = 42033,
|
||||
// LensSpecification = 42034,
|
||||
// LensMake = 42035,
|
||||
// LensModel = 42036,
|
||||
// LensSerialNumber = 42037
|
||||
// }
|
||||
|
||||
}
|
||||
// }
|
@ -25,9 +25,9 @@ public interface ILocation
|
||||
static Models.Location? GetLocation(DatabaseFile databaseFile, Marker marker, Models.OutputResolution outputResolution) =>
|
||||
Location.GetLocation(databaseFile, marker, outputResolution);
|
||||
|
||||
List<Models.Location> TestStatic_GetLocations<T>(List<LocationContainer<T>> locationContainers, List<Models.Face> faces, List<MappingFromPhotoPrism> mappingFromPhotoPrismCollection, float rectangleIntersectMinimum) =>
|
||||
List<Models.Location> TestStatic_GetLocations(List<LocationContainer> locationContainers, List<Models.Face> faces, List<MappingFromPhotoPrism> mappingFromPhotoPrismCollection, float rectangleIntersectMinimum) =>
|
||||
GetLocations(locationContainers, faces, mappingFromPhotoPrismCollection, rectangleIntersectMinimum);
|
||||
static List<Models.Location> GetLocations<T>(List<LocationContainer<T>> locationContainers, List<Models.Face> faces, List<MappingFromPhotoPrism> mappingFromPhotoPrismCollection, float rectangleIntersectMinimum) =>
|
||||
static List<Models.Location> GetLocations(List<LocationContainer> locationContainers, List<Models.Face> faces, List<MappingFromPhotoPrism> mappingFromPhotoPrismCollection, float rectangleIntersectMinimum) =>
|
||||
Location.GetLocations(locationContainers, faces, mappingFromPhotoPrismCollection, rectangleIntersectMinimum);
|
||||
|
||||
RectangleF? TestStatic_GetPercentagesRectangle(int locationDigits, int wholePercentages) =>
|
||||
|
@ -245,7 +245,7 @@ internal abstract class Location
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static List<Models.Location> GetLocations<T>(List<LocationContainer<T>> locationContainers, List<Models.Face> faces, List<MappingFromPhotoPrism> mappingFromPhotoPrismCollection, float rectangleIntersectMinimum)
|
||||
internal static List<Models.Location> GetLocations(List<LocationContainer> locationContainers, List<Models.Face> faces, List<MappingFromPhotoPrism> mappingFromPhotoPrismCollection, float rectangleIntersectMinimum)
|
||||
{
|
||||
List<Models.Location> results = [];
|
||||
bool any;
|
||||
@ -266,7 +266,7 @@ internal abstract class Location
|
||||
outputResolution ??= face.OutputResolution;
|
||||
}
|
||||
int before = results.Count;
|
||||
foreach (LocationContainer<T> locationContainer in locationContainers)
|
||||
foreach (LocationContainer locationContainer in locationContainers)
|
||||
{
|
||||
if (locationContainer.Location is null)
|
||||
continue;
|
||||
@ -289,7 +289,7 @@ internal abstract class Location
|
||||
location = GetLocation(mappingFromPhotoPrism.DatabaseFile, marker, prismRectangle.Value);
|
||||
if (location is null)
|
||||
break;
|
||||
foreach (LocationContainer<T> locationContainer in locationContainers)
|
||||
foreach (LocationContainer locationContainer in locationContainers)
|
||||
{
|
||||
if (any)
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user