mohamadDev / aforge

Automatically exported from code.google.com/p/aforge
Other
0 stars 0 forks source link

RotateCubic produces aliased borders #103

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a new windows forms project and place a picture box on the form.
2. Insert the following code into the code-behind file:

using System.Drawing;
using System.Drawing.Imaging;
using System.Windows.Forms;

namespace WindowsFormsApplication2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

            Bitmap bitmap = new Bitmap(200, 200, 
PixelFormat.Format24bppRgb);

            Graphics graphics = Graphics.FromImage(bitmap);
            graphics.FillRectangle(new SolidBrush(Color.White), 0, 0, 199, 
199);
            graphics.DrawRectangle(new Pen(Color.Black), 0, 0, 199, 199);

            var filter = new AForge.Imaging.Filters.RotateBicubic(-10) { 
FillColor = Color.LightGray};
            bitmap = filter.Apply(bitmap);

            this.pictureBox1.Image = bitmap;
        }
    }
}

3. Run the program.

What is the expected output? What do you see instead?

I would expect a rotated image, with anti-aliased edges.
I get a rotated image, with aliased edges (everything else is anti-
aliased).

What version of the product are you using?

2.0

Original issue reported on code.google.com by golo.ro...@gmail.com on 27 Jul 2009 at 8:38

GoogleCodeExporter commented 9 years ago
Here is reply to your post on AForge.NET forum:
http://www.aforgenet.com/forum/viewtopic.php?f=2&t=793

Original comment by andrew.k...@gmail.com on 28 Jul 2009 at 10:59