Exemplo n.º 1
0
        public void Transform()
        {
            Bitmap output = null;

            if (Type == FilterType.flipH)
            {
                FlipH result = new FlipH();
                output = result.Apply(image, rect);
                result.Dispose();
            }
            else if (Type == FilterType.flipV)
            {
                FlipV result = new FlipV();
                output = result.Apply(image, rect);
                result.Dispose();
            }
            else if (Type == FilterType.rotatCw)
            {
                RotateCw result = new RotateCw();
                output = result.Apply(image, rect);
                result.Dispose();
            }
            else if (Type == FilterType.rotateCcw)
            {
                RotateCcw result = new RotateCcw();
                output = result.Apply(image, rect);
                result.Dispose();
            }
            output.Save(context.Response.OutputStream, ImageFormat.Png);
        }
Exemplo n.º 2
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 17;
         hash = hash * 23 + RotateCw.GetHashCode();
         hash = hash * 23 + ReflectX.GetHashCode();
         hash = hash * 23 + Tile.GetHashCode();
         return(hash);
     }
 }