ResizingServer
A image server base on .NET & ImageResizer
Install / Use
/learn @chsword/ResizingServerREADME
ResizingServer
- .NET base
- Image server
- Support resizing thumb
- Use ImageResizer
Server Demo
Deploy ResizingServer to a web server and config
<appSettings>
<add key="UploadRouteUrl" value="api" /><!--api routeurl http://host/{UploadRouteUrl} -->
<add key="ApiKey" value="48DFD0EE-61A2-4CB5-B1D6-33E917A83202" /><!--when upload file use it -->
<add key="AllowFolders" value="face,images" /><!-- folder/category for diff biz line -->
</appSettings>
physical path like upload/face/1508/21/5a020a4161f543f197ddc0965aeeb66d.jpg
- upload
- category(eg:face or images in config:AllowFolders)
- yyMM (year and month)
- dd (date)
- {guid}.jpg
- dd (date)
- yyMM (year and month)
- category(eg:face or images in config:AllowFolders)
virtual path you can use the ResizingClient to convert from a formatUrl to url format url like /u/face/b96225af353d15504302a087f4f46bb0151d1c{0}x{1}{2}.jpg url like /u/face/b96225af353d15504302a087f4f46bb0151d1c100x100c.jpg
Client Demo
Config the App.config / Web.config
<appSettings>
<add key ="ResizingServer.Host" value="http://192.168.1.99:43287/"/>
<add key ="ResizingServer.UploadUrl" value="http://192.168.1.99:43287/api"/>
<add key ="ResizingServer.ApiKey" value="48DFD0EE-61A2-4CB5-B1D6-33E917A83202"/>
</appSettings>
Install nuget package
Install-Package ResizingClient
upload to server
var result=ResizingUtil.Upload(File.ReadAllBytes("d:\\a.jpg"), "a.jpg", "face").Result;
Console.WriteLine(result.FormatUrl);//like /u/face/b96225af353d15504302a087f4f46bb0151d1c{0}x{1}{2}.jpg
//Assert.IsTrue(result.IsSuccess);
{0}:width {1}:height {2}:mode
mode enum:
- c:crop
- m:max
- p:pad
convert format to url
using ResizingClient;
// ...
var url1 = ResizingUtil.Format(url,100,100,ResizingMode.Pad);
var url1 = ResizingUtil.Format(url,100,100);
Open Source Projects in Use
Related Skills
node-connect
341.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.4kCommit, push, and open a PR
