Display images in different-different angles



Description : This article shows how you can display images in different-different angles. Here I show you four different types of angles. There are also other angles in which you can display your image as you need.

Original image looks like below & here this article shows you that how you can rotate a given image in different-different angle...

Rotate1.gif

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
 
namespace RotateImageInDifferentAngles
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {

                Image myImage;
                myImage = Image.FromFile("C:\\img\\Aqua6.jpeg");
                myImage.RotateFlip(RotateFlipType.RotateNoneFlipX);
                pictureBox1.Image = myImage;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
    }
}


Display image as mirror....

Rotate2.gif

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace RotateImageInDifferentAngles
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                Image myImage;
                myImage = Image.FromFile("C:\\img\\Aqua6.jpeg");
                myImage.RotateFlip(RotateFlipType.Rotate180FlipNone);
                pictureBox1.Image = myImage;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
    }
}


Display image as 180 Rotation....

Rotate3.gif

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace RotateImageInDifferentAngles
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                Image myImage;
                myImage = Image.FromFile("C:\\img\\Aqua6.jpeg");
                myImage.RotateFlip(RotateFlipType.Rotate270FlipNone);
                pictureBox1.Image = myImage;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
    }
}

Display image as 270 Rotation...

Rotate4.gif

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace RotateImageInDifferentAngles
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                Image myImage;
                myImage = Image.FromFile("C:\\img\\Aqua6.jpeg");
                myImage.RotateFlip(RotateFlipType.Rotate90FlipNone);
                pictureBox1.Image = myImage;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
    }
}


Display image as 90 Rotation...

Rotate5.gif
 

o   RotateFlipType. Rotate180FlipX

o   RotateFlipType. Rotate180FlipY

o   RotateFlipType. Rotate180FlipXY

o   RotateFlipType. Rotate270FlipX

o   RotateFlipType. Rotate270FlipY

o   RotateFlipType. Rotate270FlipXY

o   RotateFlipType. Rotate90FlipX

o   RotateFlipType. Rotate90FlipY

o   RotateFlipType. Rotate90FlipXY

o   RotateFlipType. RotateNoneFlipX

o   RotateFlipType. RotateNoneFlipY

o   RotateFlipType. RotateNoneFlipXY

Using another "RotateFlipType" and the  code above you can also rotate an image as your need.
 

Up Next
    Ebook Download
    View all
    Learn
    View all