Click here to Skip to main content
15,894,106 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to rotate,flip,zoom,color change in asp.net
Posted

I would suggest you search this site for articles on image manipulation as there are quite a few.
 
Share this answer
 
This has nothing specifically to do with asp.net. It's a matter of using the framework.

A simple google search revealed this method for rotating an image (using C#).

#
public static Image RotateImage(Image img, float rotationAngle)
{
    //create an empty Bitmap image
    Bitmap bmp = new Bitmap(img.Width, img.Height);

    //turn the Bitmap into a Graphics object
    Graphics gfx = Graphics.FromImage(bmp);

    //now we set the rotation point to the center of our image
    gfx.TranslateTransform((float)bmp.Width / 2, (float)bmp.Height / 2);
 
    //now rotate the image
    gfx.RotateTransform(rotationAngle);
 
    gfx.TranslateTransform(-(float)bmp.Width / 2, -(float)bmp.Height / 2);
 
    //set the InterpolationMode to HighQualityBicubic so to ensure a high
    //quality image once it is transformed to the specified size
    gfx.InterpolationMode = InterpolationMode.HighQualityBicubic;
 
    //now draw our new image onto the graphics object
    gfx.DrawImage(img, new Point(0, 0));
 
    //dispose of our Graphics object
    gfx.Dispose();
 
    //return the image
    return bmp;
} 





Using google is not only easy, it's a lot faster than posting a question and waiting for the answer you want.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900