Class ImageGenerator
Implements operations for the image generator.
Inheritance
System.Object
ImageGenerator
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.Commerce.Shared
Assembly: Mediachase.Commerce.dll
Version: 12.17.2Syntax
[Obsolete("The old image system based on MetaData Plus is obsolete. You should use the new asset/media system in Episerver CMS instead. Will remain at least until January 2019")]
public static class ImageGenerator
Methods
CreateImageThumbnail(Byte[], String, Int32, Int32, Boolean)
Creates the image thumbnail.
Declaration
public static byte[] CreateImageThumbnail(byte[] data, string contentType, int height, int width, bool stretch)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | data | The data. |
System.String | contentType | Type of the content. |
System.Int32 | height | The height. |
System.Int32 | width | The width. |
System.Boolean | stretch | if set to |
Returns
Type | Description |
---|---|
System.Byte[] |
CreateImageThumbnail(Stream, String, Int32, Int32, Boolean)
Creates the image thumbnail.
Declaration
public static byte[] CreateImageThumbnail(Stream stream, string contentType, int height, int width, bool stretch)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream. |
System.String | contentType | Type of the content. |
System.Int32 | height | The height. |
System.Int32 | width | The width. |
System.Boolean | stretch | if set to |
Returns
Type | Description |
---|---|
System.Byte[] |
GetEncoderInfo(String)
Gets the encoder information for the specified mimetype. Used in imagescaling
Declaration
public static ImageCodecInfo GetEncoderInfo(string mimeType)
Parameters
Type | Name | Description |
---|---|---|
System.String | mimeType | The mimetype of the picture. |
Returns
Type | Description |
---|---|
System.Drawing.Imaging.ImageCodecInfo | System.Drawing.Imaging.ImageCodecInfo |
ThumbnailCallback()
Thumbnails the callback.
Declaration
public static bool ThumbnailCallback()
Returns
Type | Description |
---|---|
System.Boolean |