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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:54:58+00:00 2026-06-12T02:54:58+00:00

i got a problem with image scaling in C#. I have a picture Box

  • 0

i got a problem with image scaling in C#.

I have a picture Box with given Size : e.g. width = 800px height = 600px

I am loading different images into that picture box, small ones ( 400×400) and big ones (800+ x 600+)

My images are getting resized if they do not fit into box. But they are always resized to MAX width and height of PictureBox. So the aspect ratio is destroyed.

Can anybody help to identify / fix the problem?

Classes:

Form1.cs

ImageHandling.cs (commented out)

ImageUtilities.cs

Examples:

Problem 1:
My Version
enter image description here

vs
Original Source enter image description here

Problem 2:
My Version
enter image description here

vs
Original Source
enter image description here

How i want it:

Solution
enter image description here

  • 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-12T02:55:00+00:00Added an answer on June 12, 2026 at 2:55 am
    this.PictureBox1.SizeMode = PictureBoxSizeMode.Zoom;
    

    Set that property to your PictureBox and the size of the image will increased or decreased to fit the PictureBox maintaining the size ratio.

    For more info: http://msdn.microsoft.com/en-us/library/system.windows.forms.picturebox.sizemode.aspx

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

Sidebar

Related Questions

have a nice day. I got problem when trying to create an image from
I got some problem with text width while it wrapping floating image. Here is
I got a problem to solve. Look at the picture: Image . Red filled
i've got some jquery script that changes element image on mouseover and the problem
I'm facing a problem of algorithm. Here's the thing : I've got an image
I got following problem: I load an image into my canvas and do stuff
I've got a strange problem here. I have a class that I'll call MainView
I have a simple problem with an image going under text, rather than beside
I've got a problem with trying to make a part of the image transparent
I have got a problem with a slider. When i grab the handler, i

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.