C# Class Disco.Services.ImagingExtensions

Mostrar archivo Open project: garysharp/Disco

Public Methods

Method 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 method

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

CalculateResize() public static method

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

CalculateResize() public static method

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

CalculateResize() public static method

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

Divide() public static method

public static Divide ( this Other, float Divisor ) : RectangleF
Other this
Divisor float
return System.Drawing.RectangleF

DrawImageResized() public static method

public static DrawImageResized ( this graphics, Image SourceImage ) : void
graphics this
SourceImage Image
return void

DrawImageResized() public static method

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

EmbedIconOverlay() public static method

public static EmbedIconOverlay ( this Source, Image Icon ) : void
Source this
Icon Image
return void

InterpolateColours() public static method

public static InterpolateColours ( this Start, Color End, double Progress ) : Color
Start this
End Color
Progress double
return Color

Multiply() public static method

public static Multiply ( this Other, float Multiplier ) : RectangleF
Other this
Multiplier float
return System.Drawing.RectangleF

ResizeImage() public static method

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

RotateImage() public static method

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

SaveJpg() public static method

public static SaveJpg ( this Source, int Quality ) : Stream
Source this
Quality int
return Stream

SaveJpg() public static method

public static SaveJpg ( this Source, int Quality, Stream OutStream ) : void
Source this
Quality int
OutStream Stream
return void

SaveJpg() public static method

public static SaveJpg ( this Source, int Quality, string Filename ) : void
Source this
Quality int
Filename string
return void

SavePng() public static method

public static SavePng ( this Source ) : Stream
Source this
return Stream

SavePng() public static method

public static SavePng ( this Source, Stream OutStream ) : void
Source this
OutStream Stream
return void

SavePng() public static method

public static SavePng ( this Source, string Filename ) : void
Source this
Filename string
return void