diff --git a/ImageMapper.slnx b/ImageMapper.slnx index f31c8a2..ad14e6e 100644 --- a/ImageMapper.slnx +++ b/ImageMapper.slnx @@ -4,6 +4,7 @@ + diff --git a/README.md b/README.md index a412236..22cd833 100644 --- a/README.md +++ b/README.md @@ -6,16 +6,16 @@ ImageMapper is a server hosted application that processes images from a configur This application is built using .NET and leverages the Leaflet.js library for map rendering. Aspire is used for hosting and orchestrating the application components, while MetadataExtractor is used to extract geotagged metadata from the images. -This project has partly been an experiment in using AI tools such as GitHub Copilot as a coding assistant, for initial scaffolding, and unit test creation. +This project has partly been an experiment in using AI tools such as GitHub Copilot as a coding assistant particularly for initial scaffolding and unit test creation. With strict human review and modification to ensure quality and correctness with an exact idea of the design, using the tools to assist rather than replace human decision-making. -Also to use Aspire as a hosting and orchestration tool for a .NET application, to learn about its capabilities and features, and to demonstrate how it can be used in a real-world application. +Also to use Aspire as a hosting and orchestration tool for a .NET application, to learn about its capabilities and features. The concepts here are not unique to .NET and could be implemented in any language or framework. ## Dependencies -- .NET 10 (likely will work with .NET 8+) +- .NET 10 (likely can be retargeted to work with .NET 8+) - [Aspire](https://aspire.dev/) - [MetadataExtractor](https://github.com/drewnoakes/metadata-extractor-dotnet) - [Leaflet.js](https://leafletjs.com/) @@ -26,6 +26,8 @@ The concepts here are not unique to .NET and could be implemented in any languag - ImageMapper.Api - Back end API that fetches and processes image data - ImageMapper.Web - Front end .NET Blazor web app that produces the UI to render the data on a map - ImageMapper.Models - .NET class library of shared models + +### Aspire components - ImageMapper.AppHost - .NET Aspire orchestrator to run and debug in a development environment - ImageMapper.ServiceDefaults - Extensions for .NET Aspire support including service discovery, health checks and telemetry @@ -77,15 +79,34 @@ or for multuple image folders: `ImageFolder` setting takes precedence over `ImageFolders` if both are present -## TODO - -- Support for folder patterns in image folder config -- Support for folder exclusion -- Support for other formats including HIEF/HEIC and various raw image formats and/or anything MetadataExtractor supports (see https://github.com/drewnoakes/metadata-extractor-dotnet/blob/main/MetadataExtractor.Tools.FileProcessor/FileHandlerBase.cs) -- CSS improvements - SASS and/or Blazor CSS isolation. Not embedded in JS -- Caching. Memory and/or stored cache of processed image metadata to speed up subsequent loads and reduce processing on each request. Would need to detect changes however. -- UI improvements, filtering etc -- Error handling and logging improvements -- Container support -- Configurable map tile provider options? -- Support for varied image sources not just a file folder +## Supported Image Formats + +Based on support in MetadataExtractor + +### Standard Image Formats + +- jpg / jpeg — JPEG Image +- png — Portable Network Graphics +- gif — Graphics Interchange Format +- bmp — Bitmap Image +- heic — High Efficiency Image Container +- heif — High Efficiency Image Format +- ico — Windows Icon File +- webp — WebP Image +- pcx — PC Paintbrush Image +- tif / tiff — Tagged Image File Format + +### RAW Camera Formats + +- nef — Nikon Electronic Format (RAW) +- crw — Canon RAW (CRW) +- cr2 — Canon RAW (CR2) +- orf — Olympus RAW Image +- arw — Sony RAW Image +- raf — Fujifilm RAW Image +- srw — Samsung RAW Image +- x3f — Sigma RAW Image +- rw2 — Panasonic RAW Image +- rwl — Leica RAW Image +- dcr — Kodak RAW Image +- dng — Digital Negative (Adobe) diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..778c673 --- /dev/null +++ b/TODO.md @@ -0,0 +1,13 @@ +# TODO + +- Support for folder patterns in image folder config +- Support for folder exclusion +- Fetch from backend in batches for performance instead of or as well as front-end render batching +- CSS improvements - SASS and/or Blazor CSS isolation. Not embedded in JS +- Caching. Memory and/or stored cache of processed image metadata to speed up subsequent loads and reduce processing on each request. Would need to detect changes however. +- UI improvements, filtering etc +- Optionally show metadata with enlarged photo view +- Error handling and logging improvements +- Container support +- Configurable map tile provider options? +- Support for varied image sources not just a file folder \ No newline at end of file diff --git a/src/ImageMapper.Api/Services/ImageService.cs b/src/ImageMapper.Api/Services/ImageService.cs index ddf3d2c..f528747 100644 --- a/src/ImageMapper.Api/Services/ImageService.cs +++ b/src/ImageMapper.Api/Services/ImageService.cs @@ -16,7 +16,10 @@ public class ImageService : IImageService private static readonly Dictionary IdToPathMapping = []; private static readonly SemaphoreSlim MappingSem = new(1, 1); - private static readonly string[] ValidExtensions = [".jpg", ".jpeg", ".png", ".tif", ".tiff", ".nef"]; + private static readonly string[] ValidExtensions = [ + ".jpg", ".jpeg", ".png", ".gif", ".bmp", ".heic", ".heif", ".ico", ".webp", ".pcx",".tif", ".tiff", + ".nef", ".crw", ".cr2", ".orf", ".arw", ".raf", ".srw", ".x3f", ".rw2", ".rwl", ".dcr", ".dng" + ]; public ImageService(IConfiguration config) { diff --git a/src/ImageMapper.AppHost/ImageMapper.AppHost.csproj b/src/ImageMapper.AppHost/ImageMapper.AppHost.csproj index 6fb349d..80c1d1d 100644 --- a/src/ImageMapper.AppHost/ImageMapper.AppHost.csproj +++ b/src/ImageMapper.AppHost/ImageMapper.AppHost.csproj @@ -1,4 +1,4 @@ - + Exe @@ -9,7 +9,7 @@ - + diff --git a/src/ImageMapper.Web/ImageMapper.Web.csproj b/src/ImageMapper.Web/ImageMapper.Web.csproj index 6b27010..986f536 100644 --- a/src/ImageMapper.Web/ImageMapper.Web.csproj +++ b/src/ImageMapper.Web/ImageMapper.Web.csproj @@ -12,7 +12,7 @@ - +