ImageResizer
3.4.0
|
Public Member Functions | |
ImageJob (object source, object dest, Instructions instructions) | |
ImageJob (object source, object dest, Instructions instructions, bool disposeSource, bool addFileExtension) | |
ImageJob (Stream sourceStream, Stream destStream, Instructions instructions) | |
ImageJob (string sourcePath, string destPath, Instructions instructions) | |
ImageJob (object source, IEnumerable< string > requestedImageInfo) | |
Creates an ImageJob that won't run a full build - it will only do enough work in order to supply the requested data fields. More... | |
ImageJob (string sourcePath, string destPath, ResizeSettings settings) | |
ImageJob (Stream sourceStream, Stream destStream, ResizeSettings settings) | |
ImageJob (object source, object dest, ResizeSettings settings) | |
ImageJob (object source, object dest, ResizeSettings settings, bool disposeSource, bool addFileExtension) | |
ImageJob | Build () |
Shorthand method for ImageBuilder.Current.Build(this) More... | |
ImageJob | CreateDir () |
Sets CreateParentDirectory to true. Provided for easy chaining so you can do one-liners. new ImageJob(source,dest,settings).CreateDir().Build() More... | |
string | ResolveTemplatedPath (string path, ImageResizer.Util.PathUtils.VariableResolverCallback resolver) |
Internal use only. Resolves the specified (potenetially templated) path into a physical path. Applies the AddFileExtension setting using the 'ext' variable. Supplies the guid, settings.*, filename, path, and originalExt variables. The resolver method should supply 'ext', 'width', and 'height' (all of which refer to the final image). If AllowDestinationPathVariables=False, only AddFileExtenson will be processed. More... | |
Properties | |
List< string > | RequestedInfo [get, set] |
A list of strings which define properties that can be returned to the caller. "source.width", "source.height", "result.ext", "result.mime" are the most commonly used. Defaults to none More... | |
Dictionary< string, object > | ResultInfo [get, set] |
A dictionary of key/value pairs provided along with the result. More... | |
object | Source [get, set] |
The source image's physical path, app-relative virtual path, or a Stream, byte array, Bitmap, VirtualFile, IVirtualFile, HttpPostedFile, or HttpPostedFileBase instance. More... | |
object | Dest [get, set] |
The destination Stream, physical path, or app-relative virtual path. If a Bitmap instance is desired, set this to typeof(System.Drawing.Bitmap). The result will be stored in .Result More... | |
object | Result [get, set] |
The result if a Bitmap, BitmapSource, or IWICBitmapSource instance is requested. More... | |
int | SourceWidth [get] |
The width, in pixels, of the first frame or page in the source image file More... | |
int | SourceHeight [get] |
The height, in pixels, of the first frame or page in the source image file More... | |
string | ResultFileExtension [get] |
The correct file extension for the resulting file stream, without a leading dot. Will be null if the result is not an encoded image. More... | |
string | ResultMimeType [get] |
The correct mime type for the resulting file stream, without a leading dot. Will be null if the result is not an encoded image. More... | |
ResizeSettings | Settings [get, set] |
The image processing settings More... | |
Instructions | Instructions [get, set] |
The image processing instructions More... | |
bool | DisposeSourceObject [get, set] |
If true, and if 'source' is a IDisposable instead like Bitmap or Stream instance, it will be disposed after it has been used. Defaults to true. More... | |
bool | ResetSourceStream [get, set] |
If true, and if 'source' is seekable, the stream will be reset to its previous position after being read. Always true for HttpPostedFile(Base) instances, defaults to false for all others. More... | |
bool | DisposeDestinationStream [get, set] |
If true, and if 'dest' is a Stream instance, it will be disposed after the image has been written. Defaults to false. More... | |
string | FinalPath [get, set] |
Contains the final physical path to the image (if 'dest' was a path - null otherwise) More... | |
string | SourcePathData [get, set] |
If 'source' contains any path-related data, it is copied into this member for use by format detetction code, so decoding can be optimized. May be a physical or virtual path, or just a file name. More... | |
bool | AddFileExtension [get, set] |
If true, the appropriate extension for the encoding format will be added to the destination path, and the result will be stored in FinalPath in physical path form. More... | |
bool | AllowDestinationPathVariables [get, set] |
If true (the default), destination paths can include variables that are expanded during the image build process. Ex. Dest = "~/folder/<guid>.<ext>" will expand to "C:\WWW\App\folder\1ddadaadaddaa75da75ad34ad33da3a.jpg". More... | |
bool | CreateParentDirectory [get, set] |
Defaults to false. When true, the parent directory of the destination filename will be created if it doesn't already exist. More... | |
Definition at line 10 of file ImageJob.cs.
|
inline |
Creates an ImageJob that won't run a full build - it will only do enough work in order to supply the requested data fields.
source | |
requestedImageInfo | Pass null to use "source.width","source.height", "result.ext","result.mime". |
Definition at line 41 of file ImageJob.cs.
|
inline |
Shorthand method for ImageBuilder.Current.Build(this)
Definition at line 68 of file ImageJob.cs.
|
inline |
Sets CreateParentDirectory to true. Provided for easy chaining so you can do one-liners. new ImageJob(source,dest,settings).CreateDir().Build()
Definition at line 226 of file ImageJob.cs.
|
inline |
Internal use only. Resolves the specified (potenetially templated) path into a physical path. Applies the AddFileExtension setting using the 'ext' variable. Supplies the guid, settings.*, filename, path, and originalExt variables. The resolver method should supply 'ext', 'width', and 'height' (all of which refer to the final image). If AllowDestinationPathVariables=False, only AddFileExtenson will be processed.
path | |
resolver |
Definition at line 241 of file ImageJob.cs.
|
getset |
If true, the appropriate extension for the encoding format will be added to the destination path, and the result will be stored in FinalPath in physical path form.
Definition at line 198 of file ImageJob.cs.
Referenced by ImageResizer.ImageJob.ResolveTemplatedPath().
|
getset |
If true (the default), destination paths can include variables that are expanded during the image build process. Ex. Dest = "~/folder/<guid>.<ext>" will expand to "C:\WWW\App\folder\1ddadaadaddaa75da75ad34ad33da3a.jpg".
Definition at line 208 of file ImageJob.cs.
Referenced by ImageResizer.ImageJob.ResolveTemplatedPath().
|
getset |
Defaults to false. When true, the parent directory of the destination filename will be created if it doesn't already exist.
Definition at line 217 of file ImageJob.cs.
Referenced by ImageResizer.Plugins.FreeImageBuilder.FreeImageBuilderPlugin.BuildJob(), ImageResizer.ImageBuilder.BuildJob(), and ImageResizer.ImageJob.CreateDir().
|
getset |
The destination Stream, physical path, or app-relative virtual path. If a Bitmap instance is desired, set this to typeof(System.Drawing.Bitmap). The result will be stored in .Result
Definition at line 96 of file ImageJob.cs.
Referenced by ImageResizer.ImageBuilder.Build(), ImageResizer.Plugins.FreeImageBuilder.FreeImageBuilderPlugin.BuildJob(), and ImageResizer.ImageBuilder.BuildJob().
|
getset |
If true, and if 'dest' is a Stream instance, it will be disposed after the image has been written. Defaults to false.
Definition at line 169 of file ImageJob.cs.
Referenced by ImageResizer.ImageBuilder.Build().
|
getset |
If true, and if 'source' is a IDisposable instead like Bitmap or Stream instance, it will be disposed after it has been used. Defaults to true.
Definition at line 150 of file ImageJob.cs.
Referenced by ImageResizer.ImageBuilder.Build().
|
getset |
Contains the final physical path to the image (if 'dest' was a path - null otherwise)
Definition at line 178 of file ImageJob.cs.
Referenced by ImageResizer.Plugins.FreeImageBuilder.FreeImageBuilderPlugin.BuildJob(), and ImageResizer.ImageBuilder.BuildJob().
|
getset |
The image processing instructions
Definition at line 144 of file ImageJob.cs.
Referenced by ImageResizer.ImageJob.ImageJob().
|
getset |
A list of strings which define properties that can be returned to the caller. "source.width", "source.height", "result.ext", "result.mime" are the most commonly used. Defaults to none
Definition at line 75 of file ImageJob.cs.
|
getset |
If true, and if 'source' is seekable, the stream will be reset to its previous position after being read. Always true for HttpPostedFile(Base) instances, defaults to false for all others.
Definition at line 160 of file ImageJob.cs.
Referenced by ImageResizer.Plugins.FreeImageBuilder.FreeImageBuilderPlugin.BuildJob(), ImageResizer.Plugins.WicBuilder.WicBuilderPlugin.BuildJob(), and ImageResizer.ImageBuilder.BuildJob().
|
getset |
The result if a Bitmap, BitmapSource, or IWICBitmapSource instance is requested.
Definition at line 107 of file ImageJob.cs.
|
get |
The correct file extension for the resulting file stream, without a leading dot. Will be null if the result is not an encoded image.
Definition at line 124 of file ImageJob.cs.
|
getset |
A dictionary of key/value pairs provided along with the result.
Definition at line 80 of file ImageJob.cs.
|
get |
The correct mime type for the resulting file stream, without a leading dot. Will be null if the result is not an encoded image.
Definition at line 128 of file ImageJob.cs.
|
getset |
The image processing settings
Definition at line 136 of file ImageJob.cs.
Referenced by ImageResizer.ImageBuilder.Build(), ImageResizer.Plugins.FreeImageBuilder.FreeImageBuilderPlugin.BuildJob(), ImageResizer.Plugins.WicBuilder.WicBuilderPlugin.BuildJob(), and ImageResizer.ImageBuilder.BuildJob().
|
getset |
The source image's physical path, app-relative virtual path, or a Stream, byte array, Bitmap, VirtualFile, IVirtualFile, HttpPostedFile, or HttpPostedFileBase instance.
Definition at line 86 of file ImageJob.cs.
Referenced by ImageResizer.ImageBuilder.Build(), ImageResizer.Plugins.FreeImageBuilder.FreeImageBuilderPlugin.BuildJob(), and ImageResizer.ImageBuilder.BuildJob().
|
get |
The height, in pixels, of the first frame or page in the source image file
Definition at line 119 of file ImageJob.cs.
|
getset |
If 'source' contains any path-related data, it is copied into this member for use by format detetction code, so decoding can be optimized. May be a physical or virtual path, or just a file name.
Definition at line 189 of file ImageJob.cs.
Referenced by ImageResizer.Plugins.FreeImageBuilder.FreeImageBuilderPlugin.BuildJob(), and ImageResizer.ImageJob.ResolveTemplatedPath().
|
get |
The width, in pixels, of the first frame or page in the source image file
Definition at line 115 of file ImageJob.cs.