Arjang - not stretching: I want to keep the correct aspect ratio (think TV
in 4:3 ratio, versus making it fit into 16:9). Zoom does resize the image,
but keeps the correct aspect ratio. Stretching causes distortion. 

 

In the image I pasted into my email, you can see the white space on each
side of the image, where the image is fitted to the PB height but its width
is different. 

 

My guess is that (somehow) I have to resize the PictureBox itself, after
loading (as Zoom mode), based on the best fit. I'm trying to get my head
around that. Or, I just forget about giving it a border. 

 

  _____  

Ian Thomas
Victoria Park, Western Australia

  _____  

From: [email protected] [mailto:[email protected]]
On Behalf Of Arjang Assadi
Sent: Wednesday, November 16, 2011 10:59 AM
To: ozDotNet
Subject: Re: PictureBox Image sizing / border question

 

Are you looking for the stretching or resizing the PictureBox to be the size
of the image?

On 16 November 2011 13:50, Ian Thomas <[email protected]> wrote:

WinForms question. I have a PictureBox, SizeMode: Zoom, anchored,
BorderStyle: FixedSingle into which user loads an image. Since images are
not always the same aspect ratio as the PictureBox, the border does not
always fit the loaded image. Is there a way to make it do so?  



  _____  

Ian Thomas
Victoria Park, Western Australia

 

<<image001.jpg>>

Reply via email to