ProcessImage() public method

Processes the image.
public ProcessImage ( ImageFactory factory ) : Image
factory ImageFactory /// The current instance of the class containing /// the image to process. ///
return Image
示例#1
0
        /// <summary>
        /// Rotates the current image by the given angle.
        /// </summary>
        /// <param name="rotateLayer">
        /// The <see cref="T:ImageProcessor.Imaging.RotateLayer"/> containing the properties to rotate the image.
        /// </param>
        /// <returns>
        /// The current instance of the <see cref="T:ImageProcessor.ImageFactory"/> class.
        /// </returns>
        public ImageFactory Rotate(RotateLayer rotateLayer)
        {
            if (this.ShouldProcess)
            {
                // Sanitize the input.
                if (rotateLayer.Angle > 360 || rotateLayer.Angle < 0)
                {
                    rotateLayer.Angle = 0;
                }

                Rotate rotate = new Rotate { DynamicParameter = rotateLayer };

                this.Image = rotate.ProcessImage(this);
            }

            return this;
        }