Class TerrasoftImage
Inheritance
System.Object
TerrasoftImage
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()
Assembly: Terrasoft.Common.dll
Syntax
[Serializable]
public class TerrasoftImage
Constructors
TerrasoftImage()
Declaration
TerrasoftImage(Image)
Declaration
public TerrasoftImage(Image image)
Parameters
Type |
Name |
Description |
System.Drawing.Image |
image |
|
Properties
ContentType
Declaration
public TerrasoftImageContentType ContentType { get; set; }
Property Value
Height
Declaration
public int Height { get; }
Property Value
Type |
Description |
System.Int32 |
|
Declaration
public ImageFormat RawFormat { get; }
Property Value
Type |
Description |
System.Drawing.Imaging.ImageFormat |
|
Size
Declaration
public Size Size { get; }
Property Value
Type |
Description |
System.Drawing.Size |
|
Width
Declaration
public int Width { get; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
FromFile(String)
Declaration
public static TerrasoftImage FromFile(string filename)
Parameters
Type |
Name |
Description |
System.String |
filename |
|
Returns
FromStream(Stream)
Declaration
public static TerrasoftImage FromStream(Stream stream)
Parameters
Type |
Name |
Description |
System.IO.Stream |
stream |
|
Returns
FromStream(Stream, String)
Declaration
public static TerrasoftImage FromStream(Stream stream, string fileExtension)
Parameters
Type |
Name |
Description |
System.IO.Stream |
stream |
|
System.String |
fileExtension |
|
Returns
FromSvgStream(Stream)
Declaration
public static TerrasoftImage FromSvgStream(Stream stream)
Parameters
Type |
Name |
Description |
System.IO.Stream |
stream |
Image stream.
|
Returns
GetImage()
Declaration
Returns
Type |
Description |
System.Drawing.Image |
|
GetImageFileExtension()
Declaration
public string GetImageFileExtension()
Returns
Type |
Description |
System.String |
|
GetMimeType()
Declaration
public string GetMimeType()
Returns
Type |
Description |
System.String |
|
Declaration
public void Save(Stream stream, ImageFormat format)
Parameters
Type |
Name |
Description |
System.IO.Stream |
stream |
|
System.Drawing.Imaging.ImageFormat |
format |
|
ToByteArray()
Declaration
public byte[] ToByteArray()
Returns
Type |
Description |
System.Byte[] |
|
Operators
Implicit(Bitmap to TerrasoftImage)
Declaration
public static implicit operator TerrasoftImage(Bitmap value)
Parameters
Type |
Name |
Description |
System.Drawing.Bitmap |
value |
|
Returns
Implicit(Image to TerrasoftImage)
Выполняет явное преобразование типа System.Drawing.Image к типу
TerrasoftImage.
Declaration
public static implicit operator TerrasoftImage(Image value)
Parameters
Type |
Name |
Description |
System.Drawing.Image |
value |
Экземпляр System.Drawing.Image для преобразования.
|
Returns
Extension Methods