EO4Coding.Imaging.Provider
1.0.2-beta2
dotnet add package EO4Coding.Imaging.Provider --version 1.0.2-beta2
NuGet\Install-Package EO4Coding.Imaging.Provider -Version 1.0.2-beta2
<PackageReference Include="EO4Coding.Imaging.Provider" Version="1.0.2-beta2" />
paket add EO4Coding.Imaging.Provider --version 1.0.2-beta2
#r "nuget: EO4Coding.Imaging.Provider, 1.0.2-beta2"
// Install EO4Coding.Imaging.Provider as a Cake Addin #addin nuget:?package=EO4Coding.Imaging.Provider&version=1.0.2-beta2&prerelease // Install EO4Coding.Imaging.Provider as a Cake Tool #tool nuget:?package=EO4Coding.Imaging.Provider&version=1.0.2-beta2&prerelease
EO4Coding.Imaging
Image Resizing and caching for ASP.Net core middleware. For more detail visit http://wanderlustcoder.com/blog/2017/07/19/image-resizing-and-disk-caching-in-aspnet-core
Getting started
Run unit test under test directory to see the concepts and ideas on how the ImageProvider works.
The WebSample only return Hello world
for all urls except for the ones that maps to the images url.
In my example http://localhost:57734/images/Test1~small.jpg
will return Test1.jpg in the small size
Makes sure that you have images available for this, the startup will try and copy Test1 to Test5 from a resource directory 4 paths up from the current image dir if they do not exist ..\..\..\..\EO4Codong.Imaging.Resources\Images\
(you can also download this repository)
The image Provider register by default these sizes, but you can register your own
new Size() {Name="original",MaxX=0,MaxY=0}, //use 0 not to change the original size, this is also registered under the original size and will return the image as is
new Size() {Name="original-cached",MaxX=0,MaxY=0}, //this return the original size, but it wil go through the resizing process which in most cases result in a smaller file size for the same image size, the compression algorithm used seem to compress more/beter, use the test cases to compare size. Test1.jpg in my example reduced from 14MB to 2.5MB using the same size
new Size() {Name="xlarge",MaxX=1900,MaxY=1200 },
new Size() {Name="large",MaxX=1024,MaxY=768 },
new Size() {Name="medium",MaxX=800,MaxY=600 },
new Size() {Name="small",MaxX=300,MaxY=240 },
new Size() {Name="thumbnail",MaxX=160,MaxY=160 }
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- SixLabors.ImageSharp (>= 1.0.0-beta0007)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.2-beta2 | 373 | 2/11/2020 |