Resizer.Resize Method

Namespace:
Weavy.Core.Imaging
Assembly:
Weavy.Core.dll

Overloads

Resize(Bitmap, Resizer.BitmapConsumer, JobOptions) Loads the bitmap from stream, processes, and renders, sending the result Bitmap to the 'consumer' callback for encoding or usage.
Resize(Bitmap, string, JobOptions) Reads from bitmap and writes to the given physical path.
Resize(Stream, Resizer.BitmapConsumer, JobOptions) Loads the bitmap from stream, processes, and renders, sending the result Bitmap to the 'consumer' callback for encoding or usage.
Resize(Stream, Stream, JobOptions) 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.
Resize(Stream, string, JobOptions) Reads from stream and writes to the given physical path.
Resize(string, string, JobOptions) Resizes from one filename to another.

Resize(Bitmap, Resizer.BitmapConsumer, JobOptions)

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

protected Size Resize(Bitmap source, Resizer.BitmapConsumer consumer, JobOptions options)

Parameters

source
System.Drawing.Bitmap
consumer
Weavy.Core.Imaging.Resizer.BitmapConsumer
options
JobOptions

Returns

System.Drawing.Size

Resize(Bitmap, string, JobOptions)

Reads from bitmap and writes to the given physical path.

public Size Resize(Bitmap bitmap, string destPath, JobOptions options)

Parameters

bitmap
System.Drawing.Bitmap
destPath
string
options
JobOptions

Returns

System.Drawing.Size

Resize(Stream, Resizer.BitmapConsumer, JobOptions)

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

protected Size Resize(Stream s, Resizer.BitmapConsumer consumer, JobOptions options)

Parameters

s
System.IO.Stream
consumer
Weavy.Core.Imaging.Resizer.BitmapConsumer
options
JobOptions

Returns

System.Drawing.Size

Resize(Stream, Stream, JobOptions)

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 Size Resize(Stream s, Stream target, JobOptions options)

Parameters

s
System.IO.Stream
target
System.IO.Stream
options
JobOptions

Returns

System.Drawing.Size

Resize(Stream, string, JobOptions)

Reads from stream and writes to the given physical path.

public Size Resize(Stream s, string destPath, JobOptions options)

Parameters

s
System.IO.Stream
destPath
string
options
JobOptions

Returns

System.Drawing.Size

Resize(string, string, JobOptions)

Resizes from one filename to another.

public Size Resize(string sourcePath, string destPath, JobOptions options = JobOptions.CreateParentDirectory)

Parameters

sourcePath
string
destPath
string
options
JobOptions

Returns

System.Drawing.Size

The actual dimensions of the resized image.