Switched to ThumbHasher over BlurHasher
This commit is contained in:
10
Shared/Models/Methods/IThumbHasher.cs
Normal file
10
Shared/Models/Methods/IThumbHasher.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace View_by_Distance.Shared.Models.Methods;
|
||||
|
||||
public interface IThumbHasher
|
||||
{
|
||||
|
||||
byte[] Encode(string path);
|
||||
(byte[], MemoryStream) EncodeAndSave(string path, int width, int height);
|
||||
MemoryStream GetMemoryStream(byte[] thumbHashBytes, int width, int height);
|
||||
|
||||
}
|
@ -3,7 +3,6 @@ namespace View_by_Distance.Shared.Models.Properties;
|
||||
public interface IProperty
|
||||
{
|
||||
|
||||
public string? BlurHash { init; get; }
|
||||
public DateTime CreationTime { init; get; }
|
||||
public DateTime? DateTime { init; get; }
|
||||
public DateTime? DateTimeDigitized { init; get; }
|
||||
@ -17,6 +16,7 @@ public interface IProperty
|
||||
public string? Make { init; get; }
|
||||
public string? Model { init; get; }
|
||||
public string? Orientation { init; get; }
|
||||
public byte[]? ThumbHashBytes { init; get; }
|
||||
public int? Width { init; get; }
|
||||
|
||||
}
|
@ -6,7 +6,6 @@ namespace View_by_Distance.Shared.Models;
|
||||
public class Property : Properties.IProperty
|
||||
{
|
||||
|
||||
public string? BlurHash { init; get; }
|
||||
public DateTime CreationTime { init; get; }
|
||||
public DateTime? DateTime { init; get; }
|
||||
public DateTime? DateTimeDigitized { init; get; }
|
||||
@ -20,12 +19,12 @@ public class Property : Properties.IProperty
|
||||
public string? Make { init; get; }
|
||||
public string? Model { init; get; }
|
||||
public string? Orientation { init; get; }
|
||||
public byte[]? ThumbHashBytes { init; get; }
|
||||
public int? Width { init; get; }
|
||||
|
||||
[JsonConstructor]
|
||||
public Property(string? blurHash, DateTime creationTime, DateTime? dateTime, DateTime? dateTimeDigitized, DateTime? dateTimeFromName, DateTime? dateTimeOriginal, long fileSize, DateTime? gpsDateStamp, int? height, int? id, DateTime lastWriteTime, string? make, string? model, string? orientation, int? width)
|
||||
public Property(DateTime creationTime, DateTime? dateTime, DateTime? dateTimeDigitized, DateTime? dateTimeFromName, DateTime? dateTimeOriginal, long fileSize, DateTime? gpsDateStamp, int? height, int? id, DateTime lastWriteTime, string? make, string? model, string? orientation, byte[]? thumbHashBytes, int? width)
|
||||
{
|
||||
BlurHash = blurHash;
|
||||
DateTimeFromName = dateTimeFromName;
|
||||
CreationTime = creationTime;
|
||||
DateTime = dateTime;
|
||||
@ -39,6 +38,7 @@ public class Property : Properties.IProperty
|
||||
Make = make;
|
||||
Model = model;
|
||||
Orientation = orientation;
|
||||
ThumbHashBytes = thumbHashBytes;
|
||||
Width = width;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user