ImageResizer  3.4.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | List of all members
ImageResizer.Plugins.WpfBuilder.WpfEncoderPlugin Class Reference
Inheritance diagram for ImageResizer.Plugins.WpfBuilder.WpfEncoderPlugin:
Inheritance graph
[legend]
Collaboration diagram for ImageResizer.Plugins.WpfBuilder.WpfEncoderPlugin:
Collaboration graph
[legend]

Public Member Functions

IPlugin Install (Configuration.Config c)
 
bool Uninstall (Configuration.Config c)
 
 WpfEncoderPlugin (ResizeSettings settings, object original)
 
override IEncoder CreateIfSuitable (ResizeSettings settings, object original)
 If the encoder can handle the requirements specified by 'settings' and 'source', it should return an encoder instance. If not, it should return null. More...
 
void Write (BitmapSource i, Stream s)
 
- Public Member Functions inherited from ImageResizer.Plugins.Basic.DefaultEncoder
 DefaultEncoder (ImageFormat outputFormat)
 
 DefaultEncoder (ImageFormat outputFormat, int jpegQuality)
 
 DefaultEncoder (ResizeSettings settings, object original)
 
bool IsValidOutputFormat (ImageFormat f)
 Returns true if the this encoder supports the specified image format More...
 
void Write (Image image, System.IO.Stream s)
 Writes the specified image to the stream using Quality and OutputFormat More...
 
virtual IEnumerable< string > GetSupportedQuerystringKeys ()
 Returns the querystring keys used by DefaultEncoder (quality, format, and thumbnail) More...
 
IPlugin Install (Configuration.Config c)
 
bool Uninstall (Configuration.Config c)
 
IEnumerable< FileSignatureGetSignatures ()
 Returns signatures for jpeg, bmp, gif, png, wmf, ico, and tif More...
 
- Public Member Functions inherited from ImageResizer.Encoding.IEncoder
void Write (Image i, Stream s)
 Encodes the image to the specified stream More...
 
- Public Member Functions inherited from ImageResizer.Plugins.IPlugin
IPlugin Install (Config c)
 Installs the plugin in the specified Config instance. The plugin must handle all the work of loading settings, registering the plugin etc. More...
 
bool Uninstall (Config c)
 Uninstalls the plugin. Should reverse all changes made during Install More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ImageResizer.Plugins.Basic.DefaultEncoder
static ImageFormat GetRequestedFormat (string format, ImageFormat defaultValue)
 Tries to parse an ImageFormat from the settings.Format value. If an unrecogized format is specified, returns null. If an unsupported format is specified, it is returned. If no format is specified, returns defaultValue. More...
 
static ImageFormat GetOriginalFormat (object original)
 Attempts to determine the ImageFormat of the source image. First attempts to parse the path, if a string is present in original.Tag. (or if 'original' is a string) Falls back to using original.RawFormat. Returns null if both 'original' is null. RawFormat has a bad reputation, so this may return unexpected values, like MemoryBitmap or something in some situations. More...
 
static ImageFormat GetImageFormatFromPhysicalPath (string path)
 Returns the ImageFormat enumeration value based on the extension in the specified physical path. Extensions can lie, just a guess. More...
 
static string GetExtensionFromImageFormat (ImageFormat format)
 Returns an string instance from the specfied ImageFormat. First matching entry in imageExtensions is used. Returns null if not recognized. More...
 
static ImageFormat GetImageFormatFromExtension (string ext)
 Returns an ImageFormat instance from the specfied file extension. Extensions lie sometimes, just a guess. returns null if not recognized. More...
 
static void AddImageExtension (string extension, ImageFormat matchingFormat)
 
static string GetContentTypeFromImageFormat (ImageFormat format)
 Supports Png, Jpeg, Gif, Bmp, and Tiff. Throws a ArgumentOutOfRangeException if not png, jpeg, gif, bmp, or tiff More...
 
static ImageCodecInfo GetImageCodeInfo (string mimeType)
 Returns the first ImageCodeInfo instance with the specified mime type. Returns null if there are no matches. More...
 
static void SaveJpeg (Image b, Stream target, int quality)
 Saves the specified image to the specified stream using jpeg compression of the specified quality. More...
 
static void SavePng (Image img, Stream target)
 
static void SaveBmp (Image img, Stream target)
 
static void SaveGif (Image img, Stream target)
 
- Properties inherited from ImageResizer.Plugins.Basic.DefaultEncoder
ImageFormat OutputFormat [get, set]
 If you set this to anything other than Gif, Png, or Jpeg, it will throw an exception. Defaults to Jpeg More...
 
int Quality [get, set]
 0..100 value. The Jpeg compression quality. 90 is the best setting. Not relevant in Png or Gif compression More...
 
bool SupportsTransparency [get]
 Returns true if the desired output type supports transparency. More...
 
string MimeType [get]
 Returns the default mime-type for the OutputFormat More...
 
string Extension [get]
 Returns the default file extesnion for OutputFormat More...
 
- Properties inherited from ImageResizer.Encoding.IEncoder
bool SupportsTransparency [get]
 True if the output format will support transparency as it is currently configured. More...
 
string MimeType [get]
 Returns the appropriate mime-time for the output format as currently configured. More...
 
string Extension [get]
 Returns a file extension appropriate for the output format as currently configured, without a leading dot. More...
 

Detailed Description

Definition at line 12 of file WpfEncoderPlugin.cs.

Member Function Documentation

override IEncoder ImageResizer.Plugins.WpfBuilder.WpfEncoderPlugin.CreateIfSuitable ( ResizeSettings  settings,
object  original 
)
inline

If the encoder can handle the requirements specified by 'settings' and 'source', it should return an encoder instance. If not, it should return null.

Parameters
settingsRequest settings, like format, quality, colors, dither, etc.
originalMay be a Drawing.Image instance, a path, or null. To provide both, set Image.tag to the path. Helps the encoder detect the original format if the format was not specified. May also be used for palette generation hinting by some encoders.
Returns

Implements ImageResizer.Encoding.IEncoder.

Definition at line 34 of file WpfEncoderPlugin.cs.

35  {
36  /* TODO */
37  return new WpfEncoderPlugin(settings, original);
38  }

The documentation for this class was generated from the following file: