|
FREE_IMAGE_FORMAT | Format [get, set] |
|
FREE_IMAGE_SAVE_FLAGS | EncodingOptions [get, set] |
|
bool | SupportsTransparency [get] |
|
string | MimeType [get] |
|
string | Extension [get] |
|
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...
|
|
Definition at line 12 of file FreeImageEncoder.cs.
IEncoder ImageResizer.Plugins.FreeImageEncoder.FreeImageEncoderPlugin.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
-
settings | Request settings, like format, quality, colors, dither, etc. |
original | May 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 81 of file FreeImageEncoder.cs.
83 ImageFormat requestedFormat = DefaultEncoder.GetRequestedFormat(settings.Format, ImageFormat.Jpeg);
84 if (requestedFormat == null || !IsValidOutputFormat(requestedFormat))
return null;
85 if (!
"freeimage".Equals(settings[
"encoder"], StringComparison.OrdinalIgnoreCase))
return null;
86 if (!FreeImage.IsAvailable())
return null;
87 return new FreeImageEncoderPlugin(settings, original);
The documentation for this class was generated from the following file: