Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8970719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:46:36+00:00 2026-06-15T17:46:36+00:00

Possible Duplicate: How to Resize Image and save in folder? I would like to

  • 0

Possible Duplicate:
How to Resize Image and save in folder?

I would like to resize and save as images in a given folder. But i want to do it with maximum possible quality. I am willing to use third party software.

Like paint.net or photoshop.

So what is the best possible way of achieving this ?

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T17:46:37+00:00Added an answer on June 15, 2026 at 5:46 pm

    Disclaimer: The following link/code is from my blog:

    You should take a look at this post on my site http://samuelhaddad.com/2011/01/26/net-high-quality-thumbnail-generation/

    The code from the post looks something like:

    //Image Resize Helper Method
    private static Bitmap ResizeImage(String filename, int maxWidth, int maxHeight)
    {
        using (Image originalImage = Image.FromFile(filename))
        {
            //Caluate new Size
            int newWidth = originalImage.Width;
            int newHeight = originalImage.Height;
            double aspectRatio = (double)originalImage.Width / (double)originalImage.Height;
            if (aspectRatio <= 1 && originalImage.Width > maxWidth)
            {
                newWidth = maxWidth;
                newHeight = (int)Math.Round(newWidth / aspectRatio);
            }
            else if (aspectRatio > 1 && originalImage.Height > maxHeight)
            {
                newHeight = maxHeight;
                newWidth = (int)Math.Round(newHeight * aspectRatio);
            }
            Bitmap newImage = new Bitmap(newWidth, newHeight);
            using (Graphics g = Graphics.FromImage(newImage))
            {
                //--Quality Settings Adjust to fit your application
                g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBilinear;
                g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
                g.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;
                g.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
                g.DrawImage(originalImage, 0, 0, newImage.Width, newImage.Height);
                return newImage;
            }
        }
    }
    

    You can wrap that in a for loop for batch processing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: resize image on save Am trying to create a thumbnail in django,
Possible Duplicate: PHP image resize on the fly vs storing resized images I was
Possible Duplicate: Can anybody suggest the best image resize script in php? I'm still
Possible Duplicate: Resizing an Image without losing any quality The code I always use
Possible Duplicate: Resize a picture to a fixed size How to resize an image
Possible Duplicate: How to resize an image using PHP? Here's what I've tried: $image
Possible Duplicate: Javascript window resize event I want to get an event which is
Possible Duplicate: Resize an Image C# How can I programmatically resize an image in
Possible Duplicate: Image center align vertically and horizontally I'm uploading images to a php
Possible Duplicate: How can I convert a list<> to a multi-dimensional array? I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.