initial push

This commit is contained in:
ti_mo
2026-01-02 01:41:58 +01:00
commit c446ff9afb
19 changed files with 438 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
using System;
using System.IO;
using Avalonia.Media;
using Avalonia.Media.Imaging;
using Avalonia.Platform.Storage;
namespace Photos.Models;
public class Photo
{
public string DisplayName { get; set; }
public string FullPath { get; set; }
public string DisplayPath { get; set; }
public IImage Source { get; set; }
public Photo(string path, string relativeTo)
{
DisplayName = System.IO.Path.GetFileName(path);
FullPath = path;
DisplayPath = path.Remove(0, relativeTo.Length + 1);
using (var stream = File.OpenRead(path))
{
Source = new Bitmap(stream);
}
}
}