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);
        }
Esempio n. 2
0
        public override int GetHashCode()
        {
            int hashCode = 1855599113;

            hashCode = hashCode * -1521134295 + FlipH.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <VideoFilter[]> .Default.GetHashCode(Items);

            return(hashCode);
        }