日期:2014-05-17 浏览次数:20902 次
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
namespace IceFilter
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
srcBitmap = new Bitmap("src.jpg");
pictureBox1.Image = (Image)srcBitmap;
}
private static Bitmap srcBitmap = null;
private static int count = 0;
private static Bitmap ConvexFilterProcess(Bitmap srcBitmap, int radius, int cenX, int cenY)
{
Bitmap a = new Bitmap(srcBitmap);
int w = a.Width;
int h = a.Height;
double distance = 0.0;
double dis = 0.0;
if (radius > cenX || radius > cenY)
{
radius = Math.Min(cenX, cenY);