C# Class Imazen.LightResize.ResizeJob

Encapsulates a resizing operation. Very limited compared to ImageResizer, absolutely no ASP.NET support.
Afficher le fichier Open project: imazen/lightresize

Méthodes publiques

Méthode Description
Build ( Stream s, Stream target, JobOptions options ) : void

Resizes from one stream to another. Warning - ensure that the first stream you open will be safely closed if the second stream fails to open! This means a using() or try/finally clause.

Build ( Stream s, string destPath, JobOptions options ) : void

Reads from Stream s and writes to the given physical path

Build ( string sourcePath, Stream target, JobOptions options ) : void

Reads from filename, writes to stream

Build ( string sourcePath, string destPath, JobOptions options ) : void

Resizes from one filename to another

ResizeJob ( ) : System

Creates a empty Job, with Mode=Max, ScalingRules=Down, JpegQuality=90, IgnoreIccProfile=false, and Format=Jpg

Méthodes protégées

Méthode Description
Build ( Stream s, BitmapConsumer consumer, JobOptions options ) : void

Loads the bitmap from stream, processes, and renders, sending the result Bitmap to the 'consumer' callback for encoding or usage.

Encode ( Stream target ) : void

Dest is encoded.

Layout ( ) : void

Layout: size and cropping constraints are calculated here

Render ( ) : void

All rendering occurs here; see layout for the math part of things. Neither 'Dest' nor 'Source' are disposed here!

Method Details

Build() protected méthode

Loads the bitmap from stream, processes, and renders, sending the result Bitmap to the 'consumer' callback for encoding or usage.
protected Build ( Stream s, BitmapConsumer consumer, JobOptions options ) : void
s Stream
consumer BitmapConsumer
options JobOptions
Résultat void

Build() public méthode

Resizes from one stream to another. Warning - ensure that the first stream you open will be safely closed if the second stream fails to open! This means a using() or try/finally clause.
public Build ( Stream s, Stream target, JobOptions options ) : void
s Stream
target Stream
options JobOptions
Résultat void

Build() public méthode

Reads from Stream s and writes to the given physical path
public Build ( Stream s, string destPath, JobOptions options ) : void
s Stream
destPath string
options JobOptions
Résultat void

Build() public méthode

Reads from filename, writes to stream
public Build ( string sourcePath, Stream target, JobOptions options ) : void
sourcePath string
target Stream
options JobOptions
Résultat void

Build() public méthode

Resizes from one filename to another
public Build ( string sourcePath, string destPath, JobOptions options ) : void
sourcePath string
destPath string
options JobOptions
Résultat void

Encode() protected méthode

Dest is encoded.
protected Encode ( Stream target ) : void
target Stream
Résultat void

Layout() protected méthode

Layout: size and cropping constraints are calculated here
protected Layout ( ) : void
Résultat void

Render() protected méthode

All rendering occurs here; see layout for the math part of things. Neither 'Dest' nor 'Source' are disposed here!
protected Render ( ) : void
Résultat void

ResizeJob() public méthode

Creates a empty Job, with Mode=Max, ScalingRules=Down, JpegQuality=90, IgnoreIccProfile=false, and Format=Jpg
public ResizeJob ( ) : System
Résultat System