PhillipBurton
asked on
Rotate jpg/tif
I have an Image box in a form, whose image is populated in VBA as follows:
Image26.Picture = LoadPicture("c:\hi.jpg")
How can I get it to load rotated 90 degrees?
I am aware that http://support.microsoft.com/default.aspx?scid=KB;en-us;q186260 allows a bitmap to be rotated 90 degrees, but it doesn't work for jpgs or tifs.
Many thanks.
Image26.Picture = LoadPicture("c:\hi.jpg")
How can I get it to load rotated 90 degrees?
I am aware that http://support.microsoft.com/default.aspx?scid=KB;en-us;q186260 allows a bitmap to be rotated 90 degrees, but it doesn't work for jpgs or tifs.
Many thanks.
Why do you want to use an "Image Box" and why not a "Picture Box"..... The image box donot have hDC which severely limits the use of API to rotate the image.......
ASKER
If I could use a PictureBox, who would I do the rotation?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Burbble's solution seems quick, if one eplaces pic1hDC%, pic1hDC% with pic1hDC&, pic1hDC&.
Whilst imarshad's solution looks good, it seems to take ages with a fairly big graphic.
Thanks to everyone who helped.
Whilst imarshad's solution looks good, it seems to take ages with a fairly big graphic.
Thanks to everyone who helped.
Glad you got it working, thanks for the points.
-Burbble
-Burbble