Home

Bitmap Flipping

 

Description

Flipping a picture consists of changing its vertical direction. For example you may have a picture that seems to be oriented down:

Flip

By flipping, you can make the picture point up:

To support picture flipping, you can call the same RotateFlip() method of the Image class. This time, you would use a different value for the argument. The member of the RotateFlipType enumeration used to flip a picture is  RotateNoneFlipY. Here is an example of flipping a picture:

private void btnManipulate_Click(object sender, EventArgs e)
{
        Bitmap bmpPicture = new Bitmap("Pushpin.jpg");
        bmpPicture.RotateFlip(RotateFlipType.RotateNoneFlipY);
        CreateGraphics().DrawImage(bmpPicture, 10, 10);
}
 

Home Copyright © 2007 FunctionX, Inc.