Home All Groups Group Topic Archive Search About
Author
25 Mar 2006 5:45 PM
Graphics
I stand correct i did not work out rotation I am looking for code that
will actually rotate the image in a picturebox so that when it is done
the actual pcture has been rotated and the image is in the picturebox
and can be manipulated.  It apprears that all the code I have found
only mimics the rotation by reading the screen..and that the actual
picture is unaltered.  Am i correct?

Author
25 Mar 2006 10:52 PM
Mike D Sutton
> I stand correct i did not work out rotation I am looking for code that
> will actually rotate the image in a picturebox so that when it is done
> the actual pcture has been rotated and the image is in the picturebox
> and can be manipulated.  It apprears that all the code I have found
> only mimics the rotation by reading the screen..and that the actual
> picture is unaltered.  Am i correct?

It's pretty much impossible to perform a rotation of an image in place since
in almost all cases the new image will need to be larger than the source to
fully encompas the dimensions of the new image (either this or the corners
will be clipped.)  In this case you will normally have a source and
destination buffer which means yes, the original image is untoched, however
can be replaced with the new image.
In Win2K/XP you can use the PlgBlt() API call to perform simple rotation
however the quality isn't great, failing that then as per my original reply
to your post, you'll need to have a look online for anti-aliased /
sub-sampled rotation examples.
Hope this helps,

    Mike


- Microsoft Visual Basic MVP -
E-Mail: ED***@mvps.org
WWW: Http://EDais.mvps.org/