GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - keyone2693/ImageResizer.AspNetCore: image resizer allows real-time image processing.

BranchesTags
Open more actions menu

Latest commit

 

History

56 Commits
56 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
ImageResizer.AspNetCore
ImageResizer.AspNetCore
 
 
TestExample
TestExample
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
ImageResizing.sln
ImageResizing.sln
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

ImageResizer.AspNetCore

Development

Build status NuGet GitHub issues GitHub stars GitHub license

You can see the DEMO here: Demo

Before posting new issues: Test samples

Current version: 2.0.x [Stable]

In this version: all main functionality working except for disk cache and watermark which will be added soon the watermark as a text just added but need some bug fix

Overview

it's for DotNetCore only

aspnetcore 2.0 +

Easy to install

Use the library as dll, reference from nuget or use this in package manager console

Install-Package ImageResizer.AspNetCore

Wiki

for using this awesome library, you only need to add two things

first: add this line of code to your Startup.cs

public void ConfigureServices(IServiceCollection services)
{
  services.AddSingleton<IFileProvider>(_ => new PhysicalFileProvider(_env.WebRootPath ?? _env.ContentRootPath));
  //...
  services.AddImageResizer();
  //...
}

you may need this:

 private readonly IWebHostEnvironment _env;
 public Startup(IWebHostEnvironment env)
 {
     _env = env;
     var builder = new ConfigurationBuilder()
       .SetBasePath(env.ContentRootPath)
       .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
       .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
       .AddEnvironmentVariables();
       Configuration = builder.Build();
}

Then this one :

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
  //...
  // services.AddSingleton<IFileProvider>(_ => new PhysicalFileProvider(_env.WebRootPath ?? _env.ContentRootPath));
  app.UseStaticFiles();
  app.UseImageResizer();
  //...
}

and you can use it in your client-side(html,css,ts,...) just like below:

Simple As That Enjoy :))

<img src="~/images/mardinCity.jpg?w=200" />
<img src="~/images/mardinCity.jpg?h=300" />
<img src="~/images/mardinCity.jpg?format=png" />
<img src="~/images/mardinCity.jpg?format=jpg" />
<img src="~/images/mardinCity.jpg?format=jpeg" />
<img src="~/images/mardinCity.jpg?w=100&h=200&mode=pad" />
<img src="~/images/mardinCity.jpg?w=100&h=200&mode=max" />
<img src="~/images/mardinCity.jpg?w=100&h=200&mode=crop" />
<img src="~/images/mardinCity.jpg?w=100&h=200&mode=stretch" />
<img src="~/images/mardinCity.jpg?autorotate=true" />
<img src="~/images/mardinCity.jpg?autorotate=false" />
<img src="~/images/mardinCity.jpg?quality=5" />
<img src="~/images/mardinCity.jpg?w=400&quality=80" />

About

image resizer allows real-time image processing.

imageresizer.keyone2693.ir

Resources

Readme
MIT license
Activity

Stars

35 stars

Watchers

5 watching

Forks

13 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.