What is it Image Processor?
Image Processor is contain many libraries which is written in Asp.Net C#. it is also known as media processor. in which you can easily manipulate images using Asp.Net 4.5+ in C#. It has multiple methods to manipulates images, it uses Image Factory class.
Problems with Resigning Images:
I have developed a project in Umbraco cms and I want to display only one image in multiple pages with vary in sizes. In the image folder, I saved an image with different size. For example,
but this is not a proper way.
The solution with Image Processor Library:
I have found out a solution to resize an only single image in different in sizes. I have Install ImageProcessor in my application.
You can download ImageProcessor libraries via Nuget because its simplest and fastest way to install it.
ImageProcessor generally uses extension is called ImageProcessor.web that allow you to manipulation of images via Url API of query string parameters. And ImageProcessor.The Web uses an ImageProcessingModule class that provides various methods to perform some functions using a query string.
You can resize image in a different dimension with excellent quality to size ratio there are six different types of methods are available as follows.
- Pad (default)
You have to pass following parameters to resize image as follows
&lt;img scr="~/Images/banner.jpg?width=300&amp;height=300" alt="Banner Image" /&gt; &lt;img scr="~/Images/banner.jpg?width=300&amp;height=300&amp;mode=crop" alt="Banner Image" /&gt;
- Resize, Rotate, Rounded Corners, Flip
- Crop, Watermark, Filter, Saturation,
- Brightness, Contrast, Quality, Format,
- Vignette, Gaussian Blur, Gaussian Sharpen, and Transparency.
Using Parameter like width, height, mode and anchor we can resize image easily using ImageProcessor in Asp.Net C#.
Click Here to know more smart tricks and tips related to ASP.NET MVC C# programming.