C# Класс Disco.Services.ImagingExtensions

Показать файл Открыть проект

Открытые методы

Метод Описание
CalculateResize ( int SourceWidth, int SourceHeight, int TargetWidth, int TargetHeight ) : RectangleF
CalculateResize ( int SourceWidth, int SourceHeight, int TargetWidth, int TargetHeight, float &scaleRatio ) : RectangleF
CalculateResize ( this Source, int TargetWidth, int TargetHeight ) : RectangleF
CalculateResize ( this Source, int TargetWidth, int TargetHeight, float &scaleRatio ) : RectangleF
Divide ( this Other, float Divisor ) : RectangleF
DrawImageResized ( this graphics, Image SourceImage ) : void
DrawImageResized ( this graphics, Image SourceImage, float Scale, float LocationX, float LocationY ) : void
EmbedIconOverlay ( this Source, Image Icon ) : void
InterpolateColours ( this Start, Color End, double Progress ) : Color
Multiply ( this Other, float Multiplier ) : RectangleF
ResizeImage ( this Source, int TargetWidth, int TargetHeight, Brush BackgroundColor = null ) : Bitmap
RotateImage ( this Source, float Angle, Brush BackgroundColor = null, bool ResizeIfOver45Deg = true ) : Bitmap
SaveJpg ( this Source, int Quality ) : Stream
SaveJpg ( this Source, int Quality, Stream OutStream ) : void
SaveJpg ( this Source, int Quality, string Filename ) : void
SavePng ( this Source ) : Stream
SavePng ( this Source, Stream OutStream ) : void
SavePng ( this Source, string Filename ) : void

Описание методов

CalculateResize() публичный статический Метод

public static CalculateResize ( int SourceWidth, int SourceHeight, int TargetWidth, int TargetHeight ) : RectangleF
SourceWidth int
SourceHeight int
TargetWidth int
TargetHeight int
Результат System.Drawing.RectangleF

CalculateResize() публичный статический Метод

public static CalculateResize ( int SourceWidth, int SourceHeight, int TargetWidth, int TargetHeight, float &scaleRatio ) : RectangleF
SourceWidth int
SourceHeight int
TargetWidth int
TargetHeight int
scaleRatio float
Результат System.Drawing.RectangleF

CalculateResize() публичный статический Метод

public static CalculateResize ( this Source, int TargetWidth, int TargetHeight ) : RectangleF
Source this
TargetWidth int
TargetHeight int
Результат System.Drawing.RectangleF

CalculateResize() публичный статический Метод

public static CalculateResize ( this Source, int TargetWidth, int TargetHeight, float &scaleRatio ) : RectangleF
Source this
TargetWidth int
TargetHeight int
scaleRatio float
Результат System.Drawing.RectangleF

Divide() публичный статический Метод

public static Divide ( this Other, float Divisor ) : RectangleF
Other this
Divisor float
Результат System.Drawing.RectangleF

DrawImageResized() публичный статический Метод

public static DrawImageResized ( this graphics, Image SourceImage ) : void
graphics this
SourceImage Image
Результат void

DrawImageResized() публичный статический Метод

public static DrawImageResized ( this graphics, Image SourceImage, float Scale, float LocationX, float LocationY ) : void
graphics this
SourceImage Image
Scale float
LocationX float
LocationY float
Результат void

EmbedIconOverlay() публичный статический Метод

public static EmbedIconOverlay ( this Source, Image Icon ) : void
Source this
Icon Image
Результат void

InterpolateColours() публичный статический Метод

public static InterpolateColours ( this Start, Color End, double Progress ) : Color
Start this
End Color
Progress double
Результат Color

Multiply() публичный статический Метод

public static Multiply ( this Other, float Multiplier ) : RectangleF
Other this
Multiplier float
Результат System.Drawing.RectangleF

ResizeImage() публичный статический Метод

public static ResizeImage ( this Source, int TargetWidth, int TargetHeight, Brush BackgroundColor = null ) : Bitmap
Source this
TargetWidth int
TargetHeight int
BackgroundColor System.Drawing.Brush
Результат System.Drawing.Bitmap

RotateImage() публичный статический Метод

public static RotateImage ( this Source, float Angle, Brush BackgroundColor = null, bool ResizeIfOver45Deg = true ) : Bitmap
Source this
Angle float
BackgroundColor System.Drawing.Brush
ResizeIfOver45Deg bool
Результат System.Drawing.Bitmap

SaveJpg() публичный статический Метод

public static SaveJpg ( this Source, int Quality ) : Stream
Source this
Quality int
Результат Stream

SaveJpg() публичный статический Метод

public static SaveJpg ( this Source, int Quality, Stream OutStream ) : void
Source this
Quality int
OutStream Stream
Результат void

SaveJpg() публичный статический Метод

public static SaveJpg ( this Source, int Quality, string Filename ) : void
Source this
Quality int
Filename string
Результат void

SavePng() публичный статический Метод

public static SavePng ( this Source ) : Stream
Source this
Результат Stream

SavePng() публичный статический Метод

public static SavePng ( this Source, Stream OutStream ) : void
Source this
OutStream Stream
Результат void

SavePng() публичный статический Метод

public static SavePng ( this Source, string Filename ) : void
Source this
Filename string
Результат void