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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:26:22+00:00 2026-05-18T04:26:22+00:00

When people write an article, they submit a photo to illustrate the event. But,

  • 0

When people write an article, they submit a photo to illustrate the event. But, the space to display is not wide. So, I’d like to reduce they width and/or height while keeping their original proportion. Otherwise, the image gets distorted.

Let’s say the max width is 300px. Anyting wider than that would see its width reduced to 300px. However, I’d like the Height to be reduced to the same proportion. For instance: 600 x 800 will become 300px x 400px. So, I need to be able to check the dimensions

How do I check those dimensions?
When do I check them? (i) after uploading, (ii) while retreiving from the database?…

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-18T04:26:23+00:00Added an answer on May 18, 2026 at 4:26 am

    I would suggest you check the image after upload and save two versions to the database – the original and the resized version. You should serve the resized versions with the article. That way you resize the image only once.

    For code example take a look here:

    C#: Resize An Image While Maintaining Aspect Ratio and Maximum Height

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

Sidebar

Related Questions

Say that I write an article or document about a certain topic, but the
Several online searches give me the impression that very few people like to write
I see some people write: //wordList is List<string> wordList.ForEach(delegate(string word){ Console.WriteLine(word);}); instead of: foreach(string
Possible Duplicate: Why do people write #!/usr/bin/env python on the first line of a
So I know of a few people that actually write their algorithms out in
I am trying to write sms encryption tool. People using this tool will be
I'm trying to write a commenting system, where people can comment on other comments,
I noticed people wrote about this circular reference problem quite a bit before but
I guess many people already read this article: Using your own SQLite database in
Other people have asked similar questions but I want to clarify. I want to

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.