-
-
Notifications
You must be signed in to change notification settings - Fork 887
Description
From @PromontoryProtean on January 28, 2016 6:40
I've been doing some prototyping on middeware for V3. I decided to keep it simple and build a basic thumbnail middleware. I layered it on top of the file manager web app that I have been porting to asp.net core. My repository is here:
https://github.com/PromontoryProtean/AspnetCoreFileManager
It is a basic file manager app (with some quirks to iron out) that has a tile mode that shows thumbnails for images you can upload. I built text file logging into the middleware to benchmark processing times and log exceptions. I learned a couple of interesting things from doing this. First the performance of resizing pngs is really good. I am seeing resize times generally around half a second. Jpgs have the issues we discussed in the performance thread, and I typically ran into memory errors when there were more than 3 large jpgs in a single directory. But for non-jpgs performance has been very good so far.
I took a very simple approach with generating the thumbnails and I am serving them via a memory stream rather than caching them to disk. I was going to try to build a basic cache, but after looking through V2 I wasn't sure what you had in mind for V3 equivalents for IGraphicsProcessor and IWebGraphicsProcessor. Is the general idea to use the Resampler class and/or IResampler? Or are you planning to introduce a new type of interface? I'm assuming the API is still very much in flux, so I'm just wondering what you have in mind for changes to the web apis.
Anyway, hopefully some of this will be useful for ImageProcessor.Web. I hope to help out more directly once I understand the structure and the new APIs a bit more.
Copied from original issue: JimBobSquarePants/ImageProcessor#312