Пример #1
0
        /// <summary>
        /// Processes the image.
        /// </summary>
        /// <param name="factory">The the current instance of the <see cref="T:ImageProcessor.ImageFactory" /> class containing
        /// the image to process.</param>
        /// <returns>
        /// The processed image from the current instance of the <see cref="T:ImageProcessor.ImageFactory" /> class.
        /// </returns>
        public Image ProcessImage(ImageFactory factory)
        {
            string preset = this.DynamicParameter;
            string querystring;
            this.Settings.TryGetValue(preset.Split('=')[1], out querystring);

            string oldQueryString = factory.QueryString;
            string newQueryString = Regex.Replace(oldQueryString, preset, querystring ?? string.Empty);

            return factory.AddQueryString(newQueryString).AutoProcess().Image;
        }