steve-fenton / picz Goto Github PK
View Code? Open in Web Editor NEWImage tools for ASP.NET MVC Applications
License: Apache License 2.0
Image tools for ASP.NET MVC Applications
License: Apache License 2.0
Background images should be larger that the screen width - because they are often show with crop factors. At the moment, a 400px wide screen gets a 400px wide background image, which looks low quality due to crop factors. Picz should go for the next size up for background images to improve the quality of background images.
Prevent random resize requests.
Images should not be upscaled!
If an image is requested larger than "actual size" it should be returned "as is" and not upscaled - so the cached image for a 2000px wide image in the 4000px folder should still just be 2000px wide.
The principle here is "never server a larger file than the original".
The browser's upscaling will be no worse than handling it in code anyway.
Currently, the controller action for the images is hard-coded to be...
[Route("Picz")]
And the image URLs are generated to match this (int PiczHelper)...
builder.Attributes.Add("src", $"/picz?s={options.Sizes.Min()}&p={url}");
...
sourceSets.Add($"/picz?s={size}&p={url} {size}w");
The developers consuming Picz should be allowed to configure "Picz" to be some other name!
The image-set feature is not yet well supported across all browsers. Picz could be very useful in making background images responsive.
After checking width, need to reset the stream position, i.e.
file.InputStream.Position = 0;
Handle GIF Image Types
Handle PNG images.
If an image is available without an extension, i.e.
/Content/my-image
The MIME Type should be obtained from the response, not from the extension.
Check Disk Space before creating cached images.
If images are already being served by a controller, allow them to handle the resize.
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.