How To Resize Large Image With Good Quality Using C# Coding

By: Virendra
Updated: March 24th, 2018 | Technology: Asp.Net
How To Resize Large Image With Good Quality Using C# Coding

Nowadays we need to store images on cloud and then show in many places like if create E-commerce website then image galleries can be an effective method of communicating with the visitor. But if we upload large size images then its increase the cost of storage and take time to load on the browser so A nice compromise to this situation is to present images as thumbnails.This article shows how to Resize a large image with good quality.

Follow these simple steps:

Steps:

  1. Select Image which you want to Resize and upload on the server.
    sssss
  2. Go to Controller section and add following assemblies. Create function of “ResizeImage()” in controller.

  1. For we use large images for resizing so we need following settings on web.config file.
    1. yyyy
    2. eeeeee
    3. Some time we facing an issue of the garbage collection and memory when we upload large size of images so we used the following things for remove garbage collection and other space.
Copy to Clipboard
  1. Currently, I was store resized image in a folder so first create one folder in our solution where we need to store resized images.

    Note:- In this article, we store resized images on our server but if we need to store resized images on the cloud then please refer my next article “ Upload Multiple Images In Azure Blob Storage ”.

    uuuu
  2. Create Action in Controller where we call “ResizeImage()” function.
Copy to Clipboard

Example:

qqqq

The source code shown in this article can be downloaded from here:

https://github.com/prajapatichintan/Resize-Large-Image-With-Good-Quality