C# 클래스 Clippy.Imaging.ResizeImage

Class that enables resizing of images
상속: IDisposable
파일 보기 프로젝트 열기: 24hr/Clippy 1 사용 예제들

공개 메소드들

메소드 설명
Constrain ( ) : ResizeImage

Sets the resizing method to contstrain

Crop ( ) : ResizeImage

Sets the resizing method to crop

Dispose ( ) : void

Disposes the used resources

Distort ( ) : ResizeImage

Sets the resizing method to distort

Pad ( Brush brush ) : ResizeImage
Pad ( Color color ) : ResizeImage

Sets the resizing method to pad

Pad ( string htmlColor ) : ResizeImage

Sets the resizing method to pad

ResizeImage ( Bitmap bitmap ) : System

Initiates a new Resize from a bitmap

ResizeImage ( Stream fileStream ) : System

Initiates a new Resize from a stream

ResizeImage ( string filePath ) : System

Initialize a new Image Resize from a location on disk

Save ( ) : Bitmap

Resizes the image with the set configuration and returns the bitmap of the resized image

SaveJpeg ( Stream stream, uint quality = 95 ) : Stream

Saves the image as an jpg to the provided stream

SaveJpeg ( string path, uint quality = 95, bool overwrite = false ) : string

Resizes the image and saves it to the specified path as an jpeg. Applies the provided quality

SavePng ( Stream stream ) : Stream

Saves the resized image as a png to the provided stream

SavePng ( string path, bool overwrite = false ) : string

Saves the image as a png to the specified path

ToSize ( Size size ) : ResizeImage

Sets the targeted size of the resize

ToSize ( int width, int height ) : ResizeImage

Sets the targeted size to the provided width and height

비공개 메소드들

메소드 설명
MakeResize ( ) : Bitmap

Makes the resize of the image depeding on the provided methods

ResizeImage ( ) : System

Internal constructor that sets default values

메소드 상세

Constrain() 공개 메소드

Sets the resizing method to contstrain
public Constrain ( ) : ResizeImage
리턴 ResizeImage

Crop() 공개 메소드

Sets the resizing method to crop
public Crop ( ) : ResizeImage
리턴 ResizeImage

Dispose() 공개 메소드

Disposes the used resources
public Dispose ( ) : void
리턴 void

Distort() 공개 메소드

Sets the resizing method to distort
public Distort ( ) : ResizeImage
리턴 ResizeImage

Pad() 공개 메소드

public Pad ( Brush brush ) : ResizeImage
brush System.Drawing.Brush
리턴 ResizeImage

Pad() 공개 메소드

Sets the resizing method to pad
public Pad ( Color color ) : ResizeImage
color Color
리턴 ResizeImage

Pad() 공개 메소드

Sets the resizing method to pad
public Pad ( string htmlColor ) : ResizeImage
htmlColor string
리턴 ResizeImage

ResizeImage() 공개 메소드

Initiates a new Resize from a bitmap
public ResizeImage ( Bitmap bitmap ) : System
bitmap System.Drawing.Bitmap
리턴 System

ResizeImage() 공개 메소드

Initiates a new Resize from a stream
public ResizeImage ( Stream fileStream ) : System
fileStream Stream
리턴 System

ResizeImage() 공개 메소드

Initialize a new Image Resize from a location on disk
filePath filePath
public ResizeImage ( string filePath ) : System
filePath string
리턴 System

Save() 공개 메소드

Resizes the image with the set configuration and returns the bitmap of the resized image
public Save ( ) : Bitmap
리턴 System.Drawing.Bitmap

SaveJpeg() 공개 메소드

Saves the image as an jpg to the provided stream
stream
public SaveJpeg ( Stream stream, uint quality = 95 ) : Stream
stream Stream the stream to save to
quality uint the quality of the jpg
리턴 Stream

SaveJpeg() 공개 메소드

Resizes the image and saves it to the specified path as an jpeg. Applies the provided quality
if the quality is out of range if the path is null or empty
public SaveJpeg ( string path, uint quality = 95, bool overwrite = false ) : string
path string the absolut path to save the image to
quality uint Quality of the image, 1 to 100
overwrite bool
리턴 string

SavePng() 공개 메소드

Saves the resized image as a png to the provided stream
public SavePng ( Stream stream ) : Stream
stream Stream
리턴 Stream

SavePng() 공개 메소드

Saves the image as a png to the specified path
public SavePng ( string path, bool overwrite = false ) : string
path string the target path
overwrite bool
리턴 string

ToSize() 공개 메소드

Sets the targeted size of the resize
public ToSize ( Size size ) : ResizeImage
size System.Drawing.Size
리턴 ResizeImage

ToSize() 공개 메소드

Sets the targeted size to the provided width and height
public ToSize ( int width, int height ) : ResizeImage
width int
height int
리턴 ResizeImage