C# Class Disco.Services.ImagingExtensions

Afficher le fichier Open project: garysharp/Disco

Méthodes publiques

Méthode Description
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

Method Details

CalculateResize() public static méthode

public static CalculateResize ( int SourceWidth, int SourceHeight, int TargetWidth, int TargetHeight ) : RectangleF
SourceWidth int
SourceHeight int
TargetWidth int
TargetHeight int
Résultat System.Drawing.RectangleF

CalculateResize() public static méthode

public static CalculateResize ( int SourceWidth, int SourceHeight, int TargetWidth, int TargetHeight, float &scaleRatio ) : RectangleF
SourceWidth int
SourceHeight int
TargetWidth int
TargetHeight int
scaleRatio float
Résultat System.Drawing.RectangleF

CalculateResize() public static méthode

public static CalculateResize ( this Source, int TargetWidth, int TargetHeight ) : RectangleF
Source this
TargetWidth int
TargetHeight int
Résultat System.Drawing.RectangleF

CalculateResize() public static méthode

public static CalculateResize ( this Source, int TargetWidth, int TargetHeight, float &scaleRatio ) : RectangleF
Source this
TargetWidth int
TargetHeight int
scaleRatio float
Résultat System.Drawing.RectangleF

Divide() public static méthode

public static Divide ( this Other, float Divisor ) : RectangleF
Other this
Divisor float
Résultat System.Drawing.RectangleF

DrawImageResized() public static méthode

public static DrawImageResized ( this graphics, Image SourceImage ) : void
graphics this
SourceImage Image
Résultat void

DrawImageResized() public static méthode

public static DrawImageResized ( this graphics, Image SourceImage, float Scale, float LocationX, float LocationY ) : void
graphics this
SourceImage Image
Scale float
LocationX float
LocationY float
Résultat void

EmbedIconOverlay() public static méthode

public static EmbedIconOverlay ( this Source, Image Icon ) : void
Source this
Icon Image
Résultat void

InterpolateColours() public static méthode

public static InterpolateColours ( this Start, Color End, double Progress ) : Color
Start this
End Color
Progress double
Résultat Color

Multiply() public static méthode

public static Multiply ( this Other, float Multiplier ) : RectangleF
Other this
Multiplier float
Résultat System.Drawing.RectangleF

ResizeImage() public static méthode

public static ResizeImage ( this Source, int TargetWidth, int TargetHeight, Brush BackgroundColor = null ) : Bitmap
Source this
TargetWidth int
TargetHeight int
BackgroundColor System.Drawing.Brush
Résultat System.Drawing.Bitmap

RotateImage() public static méthode

public static RotateImage ( this Source, float Angle, Brush BackgroundColor = null, bool ResizeIfOver45Deg = true ) : Bitmap
Source this
Angle float
BackgroundColor System.Drawing.Brush
ResizeIfOver45Deg bool
Résultat System.Drawing.Bitmap

SaveJpg() public static méthode

public static SaveJpg ( this Source, int Quality ) : Stream
Source this
Quality int
Résultat Stream

SaveJpg() public static méthode

public static SaveJpg ( this Source, int Quality, Stream OutStream ) : void
Source this
Quality int
OutStream Stream
Résultat void

SaveJpg() public static méthode

public static SaveJpg ( this Source, int Quality, string Filename ) : void
Source this
Quality int
Filename string
Résultat void

SavePng() public static méthode

public static SavePng ( this Source ) : Stream
Source this
Résultat Stream

SavePng() public static méthode

public static SavePng ( this Source, Stream OutStream ) : void
Source this
OutStream Stream
Résultat void

SavePng() public static méthode

public static SavePng ( this Source, string Filename ) : void
Source this
Filename string
Résultat void