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 3420728
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:02:30+00:00 2026-05-18T06:02:30+00:00

Few days ago, I posted a question on how to resize an image while

  • 0

Few days ago, I posted a question on how to resize an image while keeping the ratio of its dimensions. I get an nice answer which helped me understand how to do so.

Unfortunately, I’ve not been yet capable of exploiting that to solve my problem. The main problem resides in the type of file used to process the image.

1° in the answer it’s about creating an image file of type

System.Drawing.Image FullsizeImage = System.Drawing.Image.FromFile("C:/path + filename");

2° In my case I’m getting an image uploaded by the user in my actionResult

public ActionResult UpLoadImage(HttpPostedFileBase image)
{
   //Now do something with image..
}

I’ve difficulty to create an Image object, first of all, because of the way the file System.Drawing.Image is created. …FromFile(OriginalFile) where OriginalFile is the name + path of the image “C:/path/filename”.

But the file I have has been uploaded and reside in a Database. And to access it, I make a query to the database.

To make the long story short, how can I resize an image keeping its dimensions ratio when the file has just been uploaded by the user (as opposed to residing in the C drive).

EDIT

How about if I want to save it (not to a c drive but) to a database? So far, what I do is to save (i) the image’s data as byte and (ii) the Mime type as a string.

How do I save the Image of type ystem.Drawing.Image to database using the same Technicals?

Thanks for helping

  • 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-05-18T06:02:31+00:00Added an answer on May 18, 2026 at 6:02 am

    You can try loading the image from stream (Image.FromStream method).

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

Sidebar

Related Questions

I Posted the background to this question a few days ago.. but the answer
A few days ago I posted this question and everyone suggested me to use
I've posted the same question here a few days ago( Java reading standard output
A few days ago, I posted this question and this question asking about how
This is a spin off from another question I posted a few days ago
I posted this question a few days ago, and I have some follow up
Last Updated: 2009-08-11 2:30pm EDT A few days ago I posted this question about
Hello I posted a few days ago a similar question and I was told
I have posted a question few days ago about Querying on collections with the
a few days ago I posted this question on the ANTLR mailinglist, but didn't

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.