usercode / imagewizard Goto Github PK
View Code? Open in Web Editor NEWImage processing webservice based on ASP.NET Core and ImageSharp / SkiaSharp / SvgNet / DocNET
Home Page: https://imagewizard.net/
License: MIT License
Image processing webservice based on ASP.NET Core and ImageSharp / SkiaSharp / SvgNet / DocNET
Home Page: https://imagewizard.net/
License: MIT License
Hi @usercode,
Can we allow to sign only 2 parts of the url?
Example:
We just sign "loader type" and "loader source" make the "filters" part free to use.
When signing url via api:
When validating:
This may affect the cache strategy.
Thanks,
Duong
Firstly a great library, well done.
UseUnsafeUrl
set to true, is there a way for the unsafe word to be removed from the url?https://localhsot:5001/image/unsafe/....
to https://localhsot:5001/image/....
?Hi,
i have tested the untested "ImageWizard.Azure" package and it does net work :)
Setup:
services.AddImageWizard(x =>
{
x.AllowUnsafeUrl = true;
//x.Key = "DEMO-KEY---PLEASE-CHANGE-THIS-KEY---PLEASE-CHANGE-THIS-KEY---PLEASE-CHANGE-THIS-KEY---==";
})
.AddHttpLoader(x=>
{
//x.RefreshMode = ImageLoaderRefreshMode.EveryTime;
x.SetHeader("Api", "XYZ");
})
.AddFileLoader()
.AddYoutubeLoader()
.AddGravatarLoader()
.AddAnalytics()
.AddAzureBlob(x =>
{
x.ConnectionString = "UseDevelopmentStorage=true";
x.ContainerName = "test";
});
and URL:
https://localhost:32768/image/unsafe/resize(500,500)/grayscale()/jpg(100)/azure/test.png
and result(in the browser): "image loader not found: azure"
it seems that imageLoader (see below) is alwas null .
Type imageLoaderType = ImageLoaderManager.Get(url_loaderType); IImageLoader loader = (IImageLoader)context.RequestServices.GetService(imageLoaderType);
let me know if you need any further information
regards
Viktor
I wanted to try out ImageWizard and I noticed that in NuGet there's only the NET 5.0 version of DLL. Is it possible to get net standard 2.0? I'm asking because Net Standard 2.0 allows for higher compatibility with older Net Framework, yet allows you to use the library on Linux and macOS.
Hi,
First of all thanks for this great library. I was looking for a way to dynamically load, resize and cache remote files and this is what I needed.
While processing files I discovered some strange behavior. Webp files are not loaded correcty. There is no difference in loading it remote of from local files. I tracked it down to the SkiaSharpPipline parsing the memory stream.
I am not sure if this has to be fixed in ImageWizard or that this is something wrong in SkiaSharp.
When you first read the stream to a byte array and use the bytearray in SKBitmap.Decode it works as expected.
using MemoryStream ms = new MemoryStream();
context.Result.Data.CopyTo(ms);
var bytes = ms.ToArray();
SKBitmap bitmap = SKBitmap.Decode(bytes);
I don't know if this creates some new memory usage issues, but at least it is a workaround if you need it.
Hi usercode,
I'm trying to adapt this package (use the core, write my own plugin with skiasharp to match my requirements)
I found that with a filter that requires many parameters, it's a pain to fill all of them.
Example, I want to have a text filter (draw text watermark to an image), so I will have following overloads
So I plan to update the middle ware to recognize the filter request as
Can you review my idea a bit.
I will implement and submit if it's okay.
haiduong87,
Thank you!
Hello @usercode
Thanks for your great work.
I found a small problem with string parameter
https://github.com/usercode/ImageWizard/blob/master/src/ImageWizard.Core/ImageProcessing/ProcessingPipeline.cs#L99
We can change to
ParameterItem p = CreateParameter(parameters[i], ".[^']+");
Because
""^func('(?.+)')$"
will match both
Assume we have 2 overloads of hello
Regex test:
https://regexr.com/5fm3i
Hello this is great, to make it more effective and useable for more users adoption,
Great library!
I looked at your 'How to use it' and the 'unsafe' works as described but when options.Key = Encoding.UTF8.GetBytes("some key");
is set on the service and/or client, and the url is encrypted based on your format with the key and url value, all the request ends up in 'Signature is not valid!' error.
Can there be a description of how to add signature to external urls via a method? i.e. If the images are called from S3 or cloud storage? Not clear if that be done via the UrlBuilder based on the notes provided.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.