Image rotation doesn't take effect till...

K

kimiraikkonen

Hi,
Here is a very interesting issue,
Assume i have picturebox and loaded a image into picturebox, however
whenever i want to rotate image using:

'For example 90 degree
PictureBox1.Image.RotateFlip(RotateFlipType.Rotate90FlipX)

This rotation takes effect on picturebox after i minimize - remaximize
form OR after i drag form somewhere outside the screen the re-bring to
a visible location on the screen.

If i don't drag form somewhere outside the screen OR minimize then re-
bring to normal window position.

Is this a bug or how can i overcome this?

Thanks a lot!
 
M

Michael D. Ober

kimiraikkonen said:
Hi,
Here is a very interesting issue,
Assume i have picturebox and loaded a image into picturebox, however
whenever i want to rotate image using:

'For example 90 degree
PictureBox1.Image.RotateFlip(RotateFlipType.Rotate90FlipX)

This rotation takes effect on picturebox after i minimize - remaximize
form OR after i drag form somewhere outside the screen the re-bring to
a visible location on the screen.

If i don't drag form somewhere outside the screen OR minimize then re-
bring to normal window position.

Is this a bug or how can i overcome this?

Thanks a lot!

Have you tried a form Refresh() or picturebox Refresh() after the rotation?

Mike Ober.
 
K

kimiraikkonen

Hi,
Here is a very interesting issue,
Assume i have picturebox and loaded a image into picturebox, however
whenever i want to rotate image using:

'For example 90 degree
PictureBox1.Image.RotateFlip(RotateFlipType.Rotate90FlipX)

This rotation takes effect on picturebox after i minimize - remaximize
form OR after i drag form somewhere outside the screen the re-bring to
a visible location on the screen.

If i don't drag form somewhere outside the screen OR minimize then re-
bring to normal window position.

Is this a bug or how can i overcome this?

Thanks a lot!

However this a kind of indirect solution which corrects this but still
i want to know why i need to adjust visibility propery of picturebox.

PictureBox1.Image.RotateFlip(RotateFlipType.Rotate90FlipX)
PictureBox1.Visible = False
PictureBox1.Visible = True

Another issue, as i stated in a post with no reply, while dragging
picturebox the image and form gets a very slow performance and jittery
tearing effects occur on screen. There's no such problem on 3rd party
softwares like XnView using on same system.

Thanks.
 
K

kimiraikkonen

Have you tried a form Refresh() or picturebox Refresh() after the rotation?

Mike Ober.

Hi! Thank you, refresh function does it without needing to refresh
picturebox using visible property to false / true :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top