C# Class Tp.Components.ImageHelper

Afficher le fichier Open project: TargetProcess/Target-Process-Plugins

Méthodes publiques

Méthode Description
CropImage ( Bitmap bitmap, Rectangle cropRect ) : Bitmap
CropImageToSquare ( Bitmap bitmap ) : Bitmap
GetThumbnail ( Bitmap initImage, int templateWidth, int templateHeight ) : Bitmap
GetThumbnail ( Stream stream, int templateWidth, int templateHeight ) : Bitmap
IsImage ( Stream stream ) : bool
ResizeAndRound ( Bitmap bitmap, int maxWidth, int maxHeight ) : Bitmap
ResizeImage ( Bitmap bitmap, int maxWidth, int maxHeight, bool withBorder ) : Bitmap
ResizeImage ( Stream stream, int maxWidth, int maxHeight, bool withBorder ) : Bitmap
ResizeImageAnyway ( Image image, int width, int height, bool withBorder ) : Bitmap
RoundCorners ( Bitmap startImage, int radious, Color color ) : Bitmap

Private Methods

Méthode Description
DrawImage ( Bitmap initImage, int templateWidth, int templateHeight, int initWidth, int initHeight ) : Bitmap

Method Details

CropImage() public static méthode

public static CropImage ( Bitmap bitmap, Rectangle cropRect ) : Bitmap
bitmap System.Drawing.Bitmap
cropRect System.Drawing.Rectangle
Résultat System.Drawing.Bitmap

CropImageToSquare() public static méthode

public static CropImageToSquare ( Bitmap bitmap ) : Bitmap
bitmap System.Drawing.Bitmap
Résultat System.Drawing.Bitmap

GetThumbnail() public static méthode

public static GetThumbnail ( Bitmap initImage, int templateWidth, int templateHeight ) : Bitmap
initImage System.Drawing.Bitmap
templateWidth int
templateHeight int
Résultat System.Drawing.Bitmap

GetThumbnail() public static méthode

public static GetThumbnail ( Stream stream, int templateWidth, int templateHeight ) : Bitmap
stream Stream
templateWidth int
templateHeight int
Résultat System.Drawing.Bitmap

IsImage() public static méthode

public static IsImage ( Stream stream ) : bool
stream Stream
Résultat bool

ResizeAndRound() public static méthode

public static ResizeAndRound ( Bitmap bitmap, int maxWidth, int maxHeight ) : Bitmap
bitmap System.Drawing.Bitmap
maxWidth int
maxHeight int
Résultat System.Drawing.Bitmap

ResizeImage() public static méthode

public static ResizeImage ( Bitmap bitmap, int maxWidth, int maxHeight, bool withBorder ) : Bitmap
bitmap System.Drawing.Bitmap
maxWidth int
maxHeight int
withBorder bool
Résultat System.Drawing.Bitmap

ResizeImage() public static méthode

public static ResizeImage ( Stream stream, int maxWidth, int maxHeight, bool withBorder ) : Bitmap
stream Stream
maxWidth int
maxHeight int
withBorder bool
Résultat System.Drawing.Bitmap

ResizeImageAnyway() public static méthode

public static ResizeImageAnyway ( Image image, int width, int height, bool withBorder ) : Bitmap
image Image
width int
height int
withBorder bool
Résultat System.Drawing.Bitmap

RoundCorners() public static méthode

public static RoundCorners ( Bitmap startImage, int radious, Color color ) : Bitmap
startImage System.Drawing.Bitmap
radious int
color Color
Résultat System.Drawing.Bitmap