// --------------------------------------------------------------------------------------------------------------------
//
// Copyright (c) James South.
// Licensed under the Apache License, Version 2.0.
//
//
// Sets the output of the image to a specific format.
//
// --------------------------------------------------------------------------------------------------------------------
namespace ImageProcessor.Processors
{
#region Using
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Text.RegularExpressions;
using ImageProcessor.Imaging.Formats;
#endregion
///
/// Sets the output of the image to a specific format.
///
public class Format : IGraphicsProcessor
{
///
/// Gets or sets DynamicParameter.
///
public dynamic DynamicParameter
{
get;
set;
}
///
/// Gets or sets any additional settings required by the processor.
///
public Dictionary Settings
{
get;
set;
}
///
/// Processes the image.
///
///
/// The the current instance of the class containing
/// the image to process.
///
///
/// The processed image from the current instance of the class.
///
public Image ProcessImage(ImageFactory factory)
{
ISupportedImageFormat format = this.DynamicParameter;
factory.Format(format);
return factory.Image;
}
}
}