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

Public Member Functions

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...
 
 WebPEncoderPlugin (NameValueCollection args)
 
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 (System.Drawing.Image i, System.IO.Stream s)
 
- Public Member Functions inherited from ImageResizer.Encoding.IEncoder
void Write (Image i, Stream s)
 Encodes the image to the specified stream More...
 

Properties

float Quality [get, set]
 
bool Lossless [get, set]
 
bool NoAlpha [get, set]
 If true, the alpha channel will be ignored, even if present. More...
 
bool SupportsTransparency [get]
 
string MimeType [get]
 
string Extension [get]
 
- 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 WebPEncoder.cs.

Member Function Documentation

IEncoder ImageResizer.Plugins.WebPEncoder.WebPEncoderPlugin.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 43 of file WebPEncoder.cs.

43  {
44  if ("webp".Equals(settings.Format, StringComparison.OrdinalIgnoreCase)) {
45  return new WebPEncoderPlugin(settings);
46  }
47  return null;
48  }
IPlugin ImageResizer.Plugins.WebPEncoder.WebPEncoderPlugin.Install ( Config  c)
inline

Installs the plugin in the specified Config instance. The plugin must handle all the work of loading settings, registering the plugin etc.

Parameters
c
Returns

Implements ImageResizer.Plugins.IPlugin.

Definition at line 14 of file WebPEncoder.cs.

14  {
15  c.Plugins.add_plugin(this);
16  return this;
17  }
bool ImageResizer.Plugins.WebPEncoder.WebPEncoderPlugin.Uninstall ( Config  c)
inline

Uninstalls the plugin. Should reverse all changes made during Install

Parameters
c
Returns

Implements ImageResizer.Plugins.IPlugin.

Definition at line 19 of file WebPEncoder.cs.

19  {
20  c.Plugins.remove_plugin(this);
21  return true;
22  }

Property Documentation

bool ImageResizer.Plugins.WebPEncoder.WebPEncoderPlugin.NoAlpha
getset

If true, the alpha channel will be ignored, even if present.

Definition at line 41 of file WebPEncoder.cs.


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