ImageResizer  3.4.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ImageResizer.Resizing.AbstractImageProcessor Class Reference

Not for external use. Inherit from BuilderExtension instead. Dual-purpose base class for both ImageBuilder and BuilderExtension Extensions can inherit and override certain methods. ImageBuilder inherits this method to utilize its extension invocation code. Each method of AbstractImageProcessor loops through all extensions and executes the same method on each. Provides a sort of multiple-inheritance mechanisim. More...

Inheritance diagram for ImageResizer.Resizing.AbstractImageProcessor:
Inheritance graph
[legend]

Public Member Functions

 AbstractImageProcessor ()
 Creates a new AbstractImageProcessor with no extensions More...
 
 AbstractImageProcessor (IEnumerable< BuilderExtension > extensions)
 Creates a new AbstractImageProcessor which will run the specified extensions with each method call. More...
 
virtual Bitmap DecodeStreamFailed (Stream s, ResizeSettings settings, string optionalPath)
 Extensions are executed until one extension returns a non-null value. This is taken to mean that the error has been resolved. Extensions should not throw an exception unless they wish to cause subsequent extensions to not execute. If extensions throw an ArgumentException or ExternalException, it will be wrapped in an ImageCorruptedException instance. If the Bitmap class is used for decoding, read gdi-bugs.txt and make sure you set b.Tag to new BitmapTag(optionalPath,stream); More...
 
virtual Bitmap DecodeStream (Stream s, ResizeSettings settings, string optionalPath)
 Extend this to support alternate image source formats. If the Bitmap class is used for decoding, read gdi-bugs.txt and make sure you set b.Tag to new BitmapTag(optionalPath,stream); More...
 

Protected Member Functions

virtual void PreLoadImage (ref object source, ref string path, ref bool disposeSource, ref ResizeSettings settings)
 Extend this to allow additional types of source objects to be accepted by transforming them into Bitmap instances. More...
 
virtual Stream GetStream (object source, ResizeSettings settings, ref bool disposeStream, out string path, out bool restoreStreamPosition)
 Extend this to allow additional types of source objects to be accepted by transforming them into Stream instances. First plugin to return a Stream wins. More...
 
virtual RequestedAction PostDecodeStream (ref Bitmap img, ResizeSettings settings)
 Extend this to modify the Bitmap instance after it has been decoded by DecodeStream or DecodeStreamFailed More...
 
virtual void PreAcquireStream (ref object dest, ResizeSettings settings)
 Extend this to allow additional types of destination objects to be accepted by transforming them into a stream. More...
 
virtual RequestedAction BuildJob (ImageResizer.ImageJob job)
 The method to override if you want to replace the entire pipeline. All Build() calls call this method first. Does nothing in ImageBuilder More...
 
virtual RequestedAction buildToStream (Bitmap source, Stream dest, ResizeSettings settings)
 Called for Build() calls that want the result encoded. (Not for Bitmap Build(source,settings) calls. Only override this method if you need to replace the behavior of image encoding and image processing together, such as adding support for resizing multi-page TIFF files or animated GIFs. More...
 
virtual Bitmap buildToBitmap (Bitmap source, ResizeSettings settings, bool transparencySupported)
 Most calls funnel through here. Default behavior configures an ImageState instance and calls Process(imageState); Shouldn't be overriden for any reason I can think of - use the appropriate virtual method under Process(). If an extension returns a Bitmap instance, it will be used instead of the default behavior. Does NOT dispose of 'source' or 'source's underlying stream. More...
 
virtual RequestedAction OnProcess (ImageState s)
 Process.0 First step of the Process() method. Can replace the entire Process method if RequestAction.Cancel is returned. Can be used to add points to translate (for image maps), and also to modify the settings More...
 
virtual RequestedAction PrepareSourceBitmap (ImageState s)
 Process.1 Switches the bitmap to the correct frame or page, and applies source flipping commands. More...
 
virtual RequestedAction PostPrepareSourceBitmap (ImageState s)
 Process.2 Extend this to apply any pre-processing to the source bitmap that needs to occur before Layout begins More...
 
virtual RequestedAction Layout (ImageState s)
 Process.3(Layout).0: This is the last point at which points to translate should be added. Only return RequestedAction.Cancel if you wish to replace the entire Layout sequence logic. More...
 
virtual RequestedAction FlipExistingPoints (ImageState s)
 Process.3(Layout).1: This is where the points in the layout are flipped the same way the source bitmap was flipped (unless their flags specify otherwise) More...
 
virtual RequestedAction LayoutImage (ImageState s)
 Process.3(Layout).2: Rings 'image' and 'imageArea' are added to the layout. More...
 
virtual RequestedAction PostLayoutImage (ImageState s)
 Process.3(Layout).3: Add rings here to insert them between the image area and the padding More...
 
virtual RequestedAction LayoutPadding (ImageState s)
 Process.3(Layout).4: Ring "padding" is added to the layout More...
 
virtual RequestedAction PostLayoutPadding (ImageState s)
 Process.3(Layout).5: Add rings here to insert them between the padding and the border More...
 
virtual RequestedAction LayoutBorder (ImageState s)
 Process.3(Layout).6: Ring "border" is added to the layout More...
 
virtual RequestedAction PostLayoutBorder (ImageState s)
 Process.3(Layout).7: Add rings here to insert them between the border and the effect rings More...
 
virtual RequestedAction LayoutEffects (ImageState s)
 Process.3(Layout).8: Effects such as 'shadow' are added here. More...
 
virtual RequestedAction PostLayoutEffects (ImageState s)
 Process.3(Layout).9: Add rings here to insert them between the effects and the margin More...
 
virtual RequestedAction LayoutMargin (ImageState s)
 Process.3(Layout).10: Margins are added to the layout More...
 
virtual RequestedAction PostLayoutMargin (ImageState s)
 Process.3(Layout).11: Add rings here to insert them around the margin. Rings will be outermost More...
 
virtual RequestedAction LayoutRotate (ImageState s)
 Process.3(Layout).anytime: Occurs when the layout is rotated. May be called anytime during Layout() More...
 
virtual RequestedAction PostLayoutRotate (ImageState s)
 Process.3(Layout).anytime: Occurs after the layout is rotated. May be called anytime during Layout() More...
 
virtual RequestedAction LayoutNormalize (ImageState s)
 Process.3(Layout).anytime: Occurs when the layout is normalized to 0,0. May be called anytime during Layout() More...
 
virtual RequestedAction PostLayoutNormalize (ImageState s)
 Process.3(Layout).anytime: Occurs after the layout is normalized. May be called anytime during Layout() More...
 
virtual RequestedAction LayoutRound (ImageState s)
 Process.3(Layout).anytime: Occurs when the layout point values are rounded to integers. May be called anytime during Layout() More...
 
virtual RequestedAction PostLayoutRound (ImageState s)
 Process.3(Layout).anytime: Occurs after the layout point values are rounded to integers. May be called anytime during Layout() More...
 
virtual RequestedAction EndLayout (ImageState s)
 Process.3(Layout).12: Occurs once layout has finished. No more changes should occur to points or rings in the layout after this method. destSize is calculated here. More...
 
virtual RequestedAction PrepareDestinationBitmap (ImageState s)
 Process.4: The destination bitmap is created and sized based destSize. A graphics object is initialized for rendering. More...
 
virtual RequestedAction Render (ImageState s)
 Process.5(Render) Rendering. Do not return RequestedAction.Cancel unless you want to replace the entire rendering system. More...
 
virtual RequestedAction RenderBackground (ImageState s)
 Process.5(Render).1 The background color is rendered More...
 
virtual RequestedAction PostRenderBackground (ImageState s)
 Process.5(Render).2 After the background color is rendered More...
 
virtual RequestedAction RenderEffects (ImageState s)
 Process.5(Render).3 Effects (such as a drop shadow or outer glow) are rendered More...
 
virtual RequestedAction PostRenderEffects (ImageState s)
 Process.5(Render).4 After outer effects are rendered More...
 
virtual RequestedAction RenderPadding (ImageState s)
 Process.5(Render).5 Image padding is drawn More...
 
virtual RequestedAction PostRenderPadding (ImageState s)
 Process.5(Render).6 After image padding is drawn More...
 
virtual RequestedAction CreateImageAttribues (ImageState s)
 Process.5(Render).7: An ImageAttributes instance is created if it doesn't already exist. More...
 
virtual RequestedAction PostCreateImageAttributes (ImageState s)
 Process.5(Render).8: The ImageAttributes instance exists and can be modified or replaced. More...
 
virtual RequestedAction PreRenderImage (ImageState s)
 Process.5(Render).9: Plugins have a chance to pre-process the source image before it gets rendered, and save it to s.preRenderBitmap More...
 
virtual RequestedAction RenderImage (ImageState s)
 Process.5(Render).10: The image is copied to the destination parallelogram specified by ring 'image'. More...
 
virtual RequestedAction PostRenderImage (ImageState s)
 Process.5(Render).11: After the image is drawn More...
 
virtual RequestedAction RenderBorder (ImageState s)
 Process.5(Render).12: The border is rendered More...
 
virtual RequestedAction PostRenderBorder (ImageState s)
 Process.5(Render).13: After the border is drawn More...
 
virtual RequestedAction PreRenderOverlays (ImageState s)
 Process.5(Render).14: Any last-minute changes before watermarking or overlays are applied More...
 
virtual RequestedAction RenderOverlays (ImageState s)
 Process.5(Render).15: Watermarks can be rendered here. All image processing should be done More...
 
virtual RequestedAction PreFlushChanges (ImageState s)
 Process.5(Render).16: Called before changes are flushed and the graphics object is destroyed. More...
 
virtual RequestedAction FlushChanges (ImageState s)
 Process.5(Render).17: Changes are flushed to the bitmap here and the graphics object is destroyed. More...
 
virtual RequestedAction PostFlushChanges (ImageState s)
 Process.5(Render).18: Changes have been flushed to the bitmap, but the final bitmap has not been flipped yet. More...
 
virtual RequestedAction ProcessFinalBitmap (ImageState s)
 Process.6: Non-rendering changes to the bitmap object occur here, such as flipping. The graphics object is unavailable. More...
 
virtual RequestedAction EndProcess (ImageState s)
 Process.7: Layout and rendering are both complete. More...
 

Protected Attributes

volatile IEnumerable
< BuilderExtension
exts
 Contains the set of extensions that are called for every method. More...
 

Detailed Description

Not for external use. Inherit from BuilderExtension instead. Dual-purpose base class for both ImageBuilder and BuilderExtension Extensions can inherit and override certain methods. ImageBuilder inherits this method to utilize its extension invocation code. Each method of AbstractImageProcessor loops through all extensions and executes the same method on each. Provides a sort of multiple-inheritance mechanisim.

Definition at line 31 of file AbstractImageProcessor.cs.

Constructor & Destructor Documentation

ImageResizer.Resizing.AbstractImageProcessor.AbstractImageProcessor ( )
inline

Creates a new AbstractImageProcessor with no extensions

Definition at line 35 of file AbstractImageProcessor.cs.

35  {
36  exts = null;
37  }
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
ImageResizer.Resizing.AbstractImageProcessor.AbstractImageProcessor ( IEnumerable< BuilderExtension extensions)
inline

Creates a new AbstractImageProcessor which will run the specified extensions with each method call.

Parameters
extensions

Definition at line 42 of file AbstractImageProcessor.cs.

42  {
43  exts = new List<BuilderExtension>(extensions != null ? extensions : new BuilderExtension[] { });
44  }
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.

Member Function Documentation

virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.BuildJob ( ImageResizer.ImageJob  job)
inlineprotectedvirtual

The method to override if you want to replace the entire pipeline. All Build() calls call this method first. Does nothing in ImageBuilder

Parameters
job
Returns

Definition at line 151 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.BuildJob().

151  {
152  if (exts != null)
153  foreach (AbstractImageProcessor p in exts)
154  if (p.BuildJob(job) == RequestedAction.Cancel)
155  return RequestedAction.Cancel;
156  return RequestedAction.None;
157  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual Bitmap ImageResizer.Resizing.AbstractImageProcessor.buildToBitmap ( Bitmap  source,
ResizeSettings  settings,
bool  transparencySupported 
)
inlineprotectedvirtual

Most calls funnel through here. Default behavior configures an ImageState instance and calls Process(imageState); Shouldn't be overriden for any reason I can think of - use the appropriate virtual method under Process(). If an extension returns a Bitmap instance, it will be used instead of the default behavior. Does NOT dispose of 'source' or 'source's underlying stream.

Parameters
source
settings
transparencySupported
Returns

Reimplemented in ImageResizer.ImageBuilder.

Definition at line 188 of file AbstractImageProcessor.cs.

188  {
189  if (exts != null) {
190  foreach (AbstractImageProcessor p in exts) {
191  Bitmap b = p.buildToBitmap(source, settings, transparencySupported);
192  if (b != null) return b;
193  }
194  }
195  return null;
196  }
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.buildToStream ( Bitmap  source,
Stream  dest,
ResizeSettings  settings 
)
inlineprotectedvirtual

Called for Build() calls that want the result encoded. (Not for Bitmap Build(source,settings) calls. Only override this method if you need to replace the behavior of image encoding and image processing together, such as adding support for resizing multi-page TIFF files or animated GIFs.

Does NOT dispose of 'source' or 'source's underlying stream.

Parameters
source
dest
settings
Returns

Reimplemented in ImageResizer.ImageBuilder, and ImageResizer.Plugins.AnimatedGifs.AnimatedGifs.

Definition at line 171 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.buildToStream().

171  {
172  if (exts != null)
173  foreach (AbstractImageProcessor p in exts)
174  if (p.buildToStream(source, dest, settings) == RequestedAction.Cancel)
175  return RequestedAction.Cancel;
176  return RequestedAction.None;
177  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.CreateImageAttribues ( ImageState  s)
inlineprotectedvirtual

Process.5(Render).7: An ImageAttributes instance is created if it doesn't already exist.

Parameters
s

Reimplemented in ImageResizer.ImageBuilder.

Definition at line 531 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.CreateImageAttribues().

531  {
532  if (exts != null)
533  foreach (AbstractImageProcessor p in exts)
534  if (p.CreateImageAttribues(s) == RequestedAction.Cancel)
535  return RequestedAction.Cancel;
536  return RequestedAction.None;
537  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual Bitmap ImageResizer.Resizing.AbstractImageProcessor.DecodeStream ( Stream  s,
ResizeSettings  settings,
string  optionalPath 
)
inlinevirtual

Extend this to support alternate image source formats. If the Bitmap class is used for decoding, read gdi-bugs.txt and make sure you set b.Tag to new BitmapTag(optionalPath,stream);

Parameters
s
settings
optionalPath
Returns

Reimplemented in ImageResizer.ImageBuilder, ImageResizer.Plugins.PdfRenderer.PdfRendererPlugin, ImageResizer.Plugins.PsdReader.PsdReader, and ImageResizer.Plugins.WebPDecoder.WebPDecoderPlugin.

Definition at line 114 of file AbstractImageProcessor.cs.

114  {
115  if (exts == null) return null;
116  foreach (AbstractImageProcessor p in exts) {
117  Bitmap b = p.DecodeStream(s,settings, optionalPath);
118  if (b != null) return b;
119  }
120  return null;
121  }
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual Bitmap ImageResizer.Resizing.AbstractImageProcessor.DecodeStreamFailed ( Stream  s,
ResizeSettings  settings,
string  optionalPath 
)
inlinevirtual

Extensions are executed until one extension returns a non-null value. This is taken to mean that the error has been resolved. Extensions should not throw an exception unless they wish to cause subsequent extensions to not execute. If extensions throw an ArgumentException or ExternalException, it will be wrapped in an ImageCorruptedException instance. If the Bitmap class is used for decoding, read gdi-bugs.txt and make sure you set b.Tag to new BitmapTag(optionalPath,stream);

Reimplemented in ImageResizer.Plugins.PsdReader.PsdReader, and ImageResizer.Plugins.WebPDecoder.WebPDecoderPlugin.

Definition at line 95 of file AbstractImageProcessor.cs.

95  {
96  if (exts == null) return null;
97  foreach (AbstractImageProcessor p in exts) {
98  if (s.CanSeek && s.Position != 0)
99  s.Seek(0, SeekOrigin.Begin);
100 
101  Bitmap b = p.DecodeStreamFailed(s,settings, optionalPath);
102  if (b != null) return b;
103  }
104  return null;
105  }
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.EndLayout ( ImageState  s)
inlineprotectedvirtual

Process.3(Layout).12: Occurs once layout has finished. No more changes should occur to points or rings in the layout after this method. destSize is calculated here.

Parameters
s

Reimplemented in ImageResizer.ImageBuilder.

Definition at line 431 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.EndLayout().

431  {
432  if (exts != null)
433  foreach (AbstractImageProcessor p in exts)
434  if (p.EndLayout(s) == RequestedAction.Cancel)
435  return RequestedAction.Cancel;
436  return RequestedAction.None;
437  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.EndProcess ( ImageState  s)
inlineprotectedvirtual

Process.7: Layout and rendering are both complete.

Parameters
s

Definition at line 682 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.EndProcess().

682  {
683  if (exts != null)
684  foreach (AbstractImageProcessor p in exts)
685  if (p.EndProcess(s) == RequestedAction.Cancel)
686  return RequestedAction.Cancel;
687  return RequestedAction.None;
688  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.FlipExistingPoints ( ImageState  s)
inlineprotectedvirtual

Process.3(Layout).1: This is where the points in the layout are flipped the same way the source bitmap was flipped (unless their flags specify otherwise)

Parameters
s

Definition at line 239 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.FlipExistingPoints().

239  {
240  if (exts != null) foreach (AbstractImageProcessor p in exts) if (p.FlipExistingPoints(s) == RequestedAction.Cancel) return RequestedAction.Cancel;
241  return RequestedAction.None;
242  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.FlushChanges ( ImageState  s)
inlineprotectedvirtual

Process.5(Render).17: Changes are flushed to the bitmap here and the graphics object is destroyed.

Parameters
s

Reimplemented in ImageResizer.ImageBuilder.

Definition at line 646 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.FlushChanges().

646  {
647  if (exts != null)
648  foreach (AbstractImageProcessor p in exts)
649  if (p.FlushChanges(s) == RequestedAction.Cancel)
650  return RequestedAction.Cancel;
651  return RequestedAction.None;
652  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual Stream ImageResizer.Resizing.AbstractImageProcessor.GetStream ( object  source,
ResizeSettings  settings,
ref bool  disposeStream,
out string  path,
out bool  restoreStreamPosition 
)
inlineprotectedvirtual

Extend this to allow additional types of source objects to be accepted by transforming them into Stream instances. First plugin to return a Stream wins.

Parameters
source
settings
disposeStream
path
restoreStreamPosition
Returns

Reimplemented in ImageResizer.Plugins.RemoteReader.RemoteReaderPlugin.

Definition at line 72 of file AbstractImageProcessor.cs.

72  {
73  path = null; //Init so the compiler doesn't complain
74  restoreStreamPosition = false;
75 
76  if (exts != null) foreach (AbstractImageProcessor p in exts) {
77  bool disposeS = disposeStream; //Copy the referenced boolean. Only allow plugins who return a stream to change its value
78  Stream s = p.GetStream(source, settings, ref disposeS, out path, out restoreStreamPosition);
79  if (s != null) {
80  disposeStream = disposeS;
81  return s;
82  }
83  }
84  return null;
85  }
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.Layout ( ImageState  s)
inlineprotectedvirtual

Process.3(Layout).0: This is the last point at which points to translate should be added. Only return RequestedAction.Cancel if you wish to replace the entire Layout sequence logic.

Parameters
s

Reimplemented in ImageResizer.ImageBuilder.

Definition at line 230 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.Layout().

230  {
231  if (exts != null) foreach (AbstractImageProcessor p in exts) if (p.Layout(s) == RequestedAction.Cancel) return RequestedAction.Cancel;
232  return RequestedAction.None;
233  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.LayoutBorder ( ImageState  s)
inlineprotectedvirtual

Process.3(Layout).6: Ring "border" is added to the layout

Parameters
s

Reimplemented in ImageResizer.ImageBuilder.

Definition at line 287 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.LayoutBorder().

287  {
288  if (exts != null)
289  foreach (AbstractImageProcessor p in exts)
290  if (p.LayoutBorder(s) == RequestedAction.Cancel)
291  return RequestedAction.Cancel;
292  return RequestedAction.None;
293  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.LayoutEffects ( ImageState  s)
inlineprotectedvirtual

Process.3(Layout).8: Effects such as 'shadow' are added here.

Parameters
s

Reimplemented in ImageResizer.Plugins.Basic.DropShadow.

Definition at line 311 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.LayoutEffects().

311  {
312  if (exts != null)
313  foreach (AbstractImageProcessor p in exts)
314  if (p.LayoutEffects(s) == RequestedAction.Cancel)
315  return RequestedAction.Cancel;
316  return RequestedAction.None;
317  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.LayoutImage ( ImageState  s)
inlineprotectedvirtual

Process.3(Layout).2: Rings 'image' and 'imageArea' are added to the layout.

Parameters
s

Reimplemented in ImageResizer.ImageBuilder, ImageResizer.Plugins.WpfBuilder.WpfBuilderPlugin, ImageResizer.Plugins.SeamCarving.SeamCarvingPlugin, ImageResizer.Plugins.CropAround.CropAroundPlugin, and ImageResizer.Plugins.WhitespaceTrimmer.WhitespaceTrimmerPlugin.

Definition at line 248 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.LayoutImage().

248  {
249  if (exts != null) foreach (AbstractImageProcessor p in exts) if (p.LayoutImage(s) == RequestedAction.Cancel) return RequestedAction.Cancel;
250  return RequestedAction.None;
251  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.LayoutMargin ( ImageState  s)
inlineprotectedvirtual

Process.3(Layout).10: Margins are added to the layout

Parameters
s

Reimplemented in ImageResizer.ImageBuilder.

Definition at line 335 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.LayoutMargin().

335  {
336  if (exts != null)
337  foreach (AbstractImageProcessor p in exts)
338  if (p.LayoutMargin(s) == RequestedAction.Cancel)
339  return RequestedAction.Cancel;
340  return RequestedAction.None;
341  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.LayoutNormalize ( ImageState  s)
inlineprotectedvirtual

Process.3(Layout).anytime: Occurs when the layout is normalized to 0,0. May be called anytime during Layout()

Parameters
s

Reimplemented in ImageResizer.ImageBuilder.

Definition at line 383 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.LayoutNormalize().

383  {
384  if (exts != null)
385  foreach (AbstractImageProcessor p in exts)
386  if (p.LayoutNormalize(s) == RequestedAction.Cancel)
387  return RequestedAction.Cancel;
388  return RequestedAction.None;
389  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.LayoutPadding ( ImageState  s)
inlineprotectedvirtual

Process.3(Layout).4: Ring "padding" is added to the layout

Parameters
s

Reimplemented in ImageResizer.ImageBuilder.

Definition at line 266 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.LayoutPadding().

266  {
267  if (exts != null) foreach (AbstractImageProcessor p in exts) if (p.LayoutPadding(s) == RequestedAction.Cancel) return RequestedAction.Cancel;
268  return RequestedAction.None;
269  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.LayoutRotate ( ImageState  s)
inlineprotectedvirtual

Process.3(Layout).anytime: Occurs when the layout is rotated. May be called anytime during Layout()

Parameters
s

Reimplemented in ImageResizer.ImageBuilder.

Definition at line 359 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.LayoutRotate().

359  {
360  if (exts != null)
361  foreach (AbstractImageProcessor p in exts)
362  if (p.LayoutRotate(s) == RequestedAction.Cancel)
363  return RequestedAction.Cancel;
364  return RequestedAction.None;
365  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.LayoutRound ( ImageState  s)
inlineprotectedvirtual

Process.3(Layout).anytime: Occurs when the layout point values are rounded to integers. May be called anytime during Layout()

Parameters
s

Reimplemented in ImageResizer.ImageBuilder.

Definition at line 407 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.LayoutRound().

407  {
408  if (exts != null)
409  foreach (AbstractImageProcessor p in exts)
410  if (p.LayoutRound(s) == RequestedAction.Cancel)
411  return RequestedAction.Cancel;
412  return RequestedAction.None;
413  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.OnProcess ( ImageState  s)
inlineprotectedvirtual

Process.0 First step of the Process() method. Can replace the entire Process method if RequestAction.Cancel is returned. Can be used to add points to translate (for image maps), and also to modify the settings

Parameters
s

Definition at line 203 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.OnProcess().

203  {
204  if (exts != null) foreach (AbstractImageProcessor p in exts) if (p.OnProcess(s) == RequestedAction.Cancel) return RequestedAction.Cancel;
205  return RequestedAction.None;
206  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.PostCreateImageAttributes ( ImageState  s)
inlineprotectedvirtual

Process.5(Render).8: The ImageAttributes instance exists and can be modified or replaced.

Parameters
s

Reimplemented in ImageResizer.Plugins.SimpleFilters.SimpleFilters.

Definition at line 542 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.PostCreateImageAttributes().

542  {
543  if (exts != null)
544  foreach (AbstractImageProcessor p in exts)
545  if (p.PostCreateImageAttributes(s) == RequestedAction.Cancel)
546  return RequestedAction.Cancel;
547  return RequestedAction.None;
548  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.PostDecodeStream ( ref Bitmap  img,
ResizeSettings  settings 
)
inlineprotectedvirtual

Extend this to modify the Bitmap instance after it has been decoded by DecodeStream or DecodeStreamFailed

Reimplemented in ImageResizer.Plugins.Basic.AutoRotate.

Definition at line 127 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.PostDecodeStream().

127  {
128  if (exts != null) foreach (AbstractImageProcessor p in exts) if (p.PostDecodeStream(ref img, settings) == RequestedAction.Cancel) return RequestedAction.Cancel;
129  return RequestedAction.None;
130  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.PostFlushChanges ( ImageState  s)
inlineprotectedvirtual

Process.5(Render).18: Changes have been flushed to the bitmap, but the final bitmap has not been flipped yet.

Parameters
s

Definition at line 658 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.PostFlushChanges().

658  {
659  if (exts != null)
660  foreach (AbstractImageProcessor p in exts)
661  if (p.PostFlushChanges(s) == RequestedAction.Cancel)
662  return RequestedAction.Cancel;
663  return RequestedAction.None;
664  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.PostLayoutBorder ( ImageState  s)
inlineprotectedvirtual

Process.3(Layout).7: Add rings here to insert them between the border and the effect rings

Parameters
s

Definition at line 299 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.PostLayoutBorder().

299  {
300  if (exts != null)
301  foreach (AbstractImageProcessor p in exts)
302  if (p.PostLayoutBorder(s) == RequestedAction.Cancel)
303  return RequestedAction.Cancel;
304  return RequestedAction.None;
305  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.PostLayoutEffects ( ImageState  s)
inlineprotectedvirtual

Process.3(Layout).9: Add rings here to insert them between the effects and the margin

Parameters
s

Definition at line 323 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.PostLayoutEffects().

323  {
324  if (exts != null)
325  foreach (AbstractImageProcessor p in exts)
326  if (p.PostLayoutEffects(s) == RequestedAction.Cancel)
327  return RequestedAction.Cancel;
328  return RequestedAction.None;
329  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.PostLayoutImage ( ImageState  s)
inlineprotectedvirtual

Process.3(Layout).3: Add rings here to insert them between the image area and the padding

Parameters
s

Reimplemented in ImageResizer.Plugins.SeamCarving.SeamCarvingPlugin, ImageResizer.Plugins.WhitespaceTrimmer.WhitespaceTrimmerPlugin, and ImageResizer.Plugins.Basic.SizeLimiting.

Definition at line 257 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.PostLayoutImage().

257  {
258  if (exts != null) foreach (AbstractImageProcessor p in exts) if (p.PostLayoutImage(s) == RequestedAction.Cancel) return RequestedAction.Cancel;
259  return RequestedAction.None;
260  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.PostLayoutMargin ( ImageState  s)
inlineprotectedvirtual

Process.3(Layout).11: Add rings here to insert them around the margin. Rings will be outermost

Parameters
s

Definition at line 347 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.PostLayoutMargin().

347  {
348  if (exts != null)
349  foreach (AbstractImageProcessor p in exts)
350  if (p.PostLayoutMargin(s) == RequestedAction.Cancel)
351  return RequestedAction.Cancel;
352  return RequestedAction.None;
353  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.PostLayoutNormalize ( ImageState  s)
inlineprotectedvirtual

Process.3(Layout).anytime: Occurs after the layout is normalized. May be called anytime during Layout()

Parameters
s

Definition at line 395 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.PostLayoutNormalize().

395  {
396  if (exts != null)
397  foreach (AbstractImageProcessor p in exts)
398  if (p.PostLayoutNormalize(s) == RequestedAction.Cancel)
399  return RequestedAction.Cancel;
400  return RequestedAction.None;
401  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.PostLayoutPadding ( ImageState  s)
inlineprotectedvirtual

Process.3(Layout).5: Add rings here to insert them between the padding and the border

Parameters
s

Definition at line 275 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.PostLayoutPadding().

275  {
276  if (exts != null)
277  foreach (AbstractImageProcessor p in exts)
278  if (p.PostLayoutPadding(s) == RequestedAction.Cancel)
279  return RequestedAction.Cancel;
280  return RequestedAction.None;
281  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.PostLayoutRotate ( ImageState  s)
inlineprotectedvirtual

Process.3(Layout).anytime: Occurs after the layout is rotated. May be called anytime during Layout()

Parameters
s

Definition at line 371 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.PostLayoutRotate().

371  {
372  if (exts != null)
373  foreach (AbstractImageProcessor p in exts)
374  if (p.PostLayoutRotate(s) == RequestedAction.Cancel)
375  return RequestedAction.Cancel;
376  return RequestedAction.None;
377  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.PostLayoutRound ( ImageState  s)
inlineprotectedvirtual

Process.3(Layout).anytime: Occurs after the layout point values are rounded to integers. May be called anytime during Layout()

Parameters
s

Definition at line 419 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.PostLayoutRound().

419  {
420  if (exts != null)
421  foreach (AbstractImageProcessor p in exts)
422  if (p.PostLayoutRound(s) == RequestedAction.Cancel)
423  return RequestedAction.Cancel;
424  return RequestedAction.None;
425  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.PostPrepareSourceBitmap ( ImageState  s)
inlineprotectedvirtual

Process.2 Extend this to apply any pre-processing to the source bitmap that needs to occur before Layout begins

Parameters
s

Reimplemented in ImageResizer.Plugins.Faces.FacesPlugin.

Definition at line 220 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.PostPrepareSourceBitmap().

220  {
221  if (exts != null) foreach (AbstractImageProcessor p in exts) if (p.PostPrepareSourceBitmap(s) == RequestedAction.Cancel) return RequestedAction.Cancel;
222  return RequestedAction.None;
223  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.PostRenderBackground ( ImageState  s)
inlineprotectedvirtual

Process.5(Render).2 After the background color is rendered

Parameters
s

Reimplemented in ImageResizer.Plugins.Watermark.WatermarkPlugin.

Definition at line 475 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.PostRenderBackground().

475  {
476  if (exts != null)
477  foreach (AbstractImageProcessor p in exts)
478  if (p.PostRenderBackground(s) == RequestedAction.Cancel)
479  return RequestedAction.Cancel;
480  return RequestedAction.None;
481  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.PostRenderBorder ( ImageState  s)
inlineprotectedvirtual

Process.5(Render).13: After the border is drawn

Parameters
s

Definition at line 599 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.PostRenderBorder().

599  {
600  if (exts != null)
601  foreach (AbstractImageProcessor p in exts)
602  if (p.PostRenderBorder(s) == RequestedAction.Cancel)
603  return RequestedAction.Cancel;
604  return RequestedAction.None;
605  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.PostRenderEffects ( ImageState  s)
inlineprotectedvirtual

Process.5(Render).4 After outer effects are rendered

Parameters
s

Definition at line 498 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.PostRenderEffects().

498  {
499  if (exts != null)
500  foreach (AbstractImageProcessor p in exts)
501  if (p.PostRenderEffects(s) == RequestedAction.Cancel)
502  return RequestedAction.Cancel;
503  return RequestedAction.None;
504  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.PostRenderImage ( ImageState  s)
inlineprotectedvirtual

Process.5(Render).11: After the image is drawn

Parameters
s

Reimplemented in ImageResizer.Plugins.SimpleFilters.SimpleFilters, ImageResizer.Plugins.Faces.FacesPlugin, ImageResizer.Plugins.RedEye.RedEyePlugin, and ImageResizer.Plugins.AdvancedFilters.AdvancedFilters.

Definition at line 577 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.PostRenderImage().

577  {
578  if (exts != null)
579  foreach (AbstractImageProcessor p in exts)
580  if (p.PostRenderImage(s) == RequestedAction.Cancel)
581  return RequestedAction.Cancel;
582  return RequestedAction.None;
583  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.PostRenderPadding ( ImageState  s)
inlineprotectedvirtual

Process.5(Render).6 After image padding is drawn

Parameters
s

Definition at line 520 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.PostRenderPadding().

520  {
521  if (exts != null)
522  foreach (AbstractImageProcessor p in exts)
523  if (p.PostRenderPadding(s) == RequestedAction.Cancel)
524  return RequestedAction.Cancel;
525  return RequestedAction.None;
526  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual void ImageResizer.Resizing.AbstractImageProcessor.PreAcquireStream ( ref object  dest,
ResizeSettings  settings 
)
inlineprotectedvirtual

Extend this to allow additional types of destination objects to be accepted by transforming them into a stream.

Parameters
dest
settings

Definition at line 140 of file AbstractImageProcessor.cs.

140  {
141  if (exts != null) foreach (AbstractImageProcessor p in exts) p.PreAcquireStream(ref dest, settings);
142  }
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.PreFlushChanges ( ImageState  s)
inlineprotectedvirtual

Process.5(Render).16: Called before changes are flushed and the graphics object is destroyed.

Parameters
s

Reimplemented in ImageResizer.Plugins.Basic.Trial.

Definition at line 634 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.PreFlushChanges().

634  {
635  if (exts != null)
636  foreach (AbstractImageProcessor p in exts)
637  if (p.PreFlushChanges(s) == RequestedAction.Cancel)
638  return RequestedAction.Cancel;
639  return RequestedAction.None;
640  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual void ImageResizer.Resizing.AbstractImageProcessor.PreLoadImage ( ref object  source,
ref string  path,
ref bool  disposeSource,
ref ResizeSettings  settings 
)
inlineprotectedvirtual

Extend this to allow additional types of source objects to be accepted by transforming them into Bitmap instances.

Parameters
source
path
disposeSource
settings

Definition at line 59 of file AbstractImageProcessor.cs.

59  {
60  if (exts != null) foreach (AbstractImageProcessor p in exts) p.PreLoadImage(ref source, ref path, ref disposeSource, ref settings);
61  }
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.PrepareDestinationBitmap ( ImageState  s)
inlineprotectedvirtual

Process.4: The destination bitmap is created and sized based destSize. A graphics object is initialized for rendering.

Parameters
s

Reimplemented in ImageResizer.ImageBuilder, and ImageResizer.Plugins.Basic.SizeLimiting.

Definition at line 442 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.PrepareDestinationBitmap().

442  {
443  if (exts != null)
444  foreach (AbstractImageProcessor p in exts)
445  if (p.PrepareDestinationBitmap(s) == RequestedAction.Cancel)
446  return RequestedAction.Cancel;
447  return RequestedAction.None;
448  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.PrepareSourceBitmap ( ImageState  s)
inlineprotectedvirtual

Process.1 Switches the bitmap to the correct frame or page, and applies source flipping commands.

Parameters
s

Reimplemented in ImageResizer.ImageBuilder.

Definition at line 212 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.PrepareSourceBitmap().

212  {
213  if (exts != null) foreach (AbstractImageProcessor p in exts) if (p.PrepareSourceBitmap(s) == RequestedAction.Cancel) return RequestedAction.Cancel;
214  return RequestedAction.None;
215  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.PreRenderImage ( ImageState  s)
inlineprotectedvirtual

Process.5(Render).9: Plugins have a chance to pre-process the source image before it gets rendered, and save it to s.preRenderBitmap

Parameters
s

Reimplemented in ImageResizer.Plugins.SeamCarving.SeamCarvingPlugin, ImageResizer.Plugins.AdvancedFilters.AdvancedFilters, ImageResizer.Plugins.FreeImageScaling.FreeImageScalingPlugin, and ImageResizer.Plugins.SimpleFilters.SimpleFilters.

Definition at line 554 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.PreRenderImage().

554  {
555  if (exts != null)
556  foreach (AbstractImageProcessor p in exts)
557  if (p.PreRenderImage(s) == RequestedAction.Cancel)
558  return RequestedAction.Cancel;
559  return RequestedAction.None;
560  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.PreRenderOverlays ( ImageState  s)
inlineprotectedvirtual

Process.5(Render).14: Any last-minute changes before watermarking or overlays are applied

Parameters
s

Definition at line 611 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.PreRenderOverlays().

611  {
612  if (exts != null)
613  foreach (AbstractImageProcessor p in exts)
614  if (p.PreRenderOverlays(s) == RequestedAction.Cancel)
615  return RequestedAction.Cancel;
616  return RequestedAction.None;
617  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.ProcessFinalBitmap ( ImageState  s)
inlineprotectedvirtual

Process.6: Non-rendering changes to the bitmap object occur here, such as flipping. The graphics object is unavailable.

Parameters
s

Reimplemented in ImageResizer.ImageBuilder.

Definition at line 670 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.ProcessFinalBitmap().

670  {
671  if (exts != null)
672  foreach (AbstractImageProcessor p in exts)
673  if (p.ProcessFinalBitmap(s) == RequestedAction.Cancel)
674  return RequestedAction.Cancel;
675  return RequestedAction.None;
676  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.Render ( ImageState  s)
inlineprotectedvirtual

Process.5(Render) Rendering. Do not return RequestedAction.Cancel unless you want to replace the entire rendering system.

Parameters
s

Reimplemented in ImageResizer.ImageBuilder, ImageResizer.Plugins.Faces.FacesPlugin, and ImageResizer.Plugins.RedEye.RedEyePlugin.

Definition at line 453 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.Render().

453  {
454  if (exts != null)
455  foreach (AbstractImageProcessor p in exts)
456  if (p.Render(s) == RequestedAction.Cancel)
457  return RequestedAction.Cancel;
458  return RequestedAction.None;
459  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.RenderBackground ( ImageState  s)
inlineprotectedvirtual

Process.5(Render).1 The background color is rendered

Parameters
s

Reimplemented in ImageResizer.ImageBuilder.

Definition at line 464 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.RenderBackground().

464  {
465  if (exts != null)
466  foreach (AbstractImageProcessor p in exts)
467  if (p.RenderBackground(s) == RequestedAction.Cancel)
468  return RequestedAction.Cancel;
469  return RequestedAction.None;
470  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.RenderBorder ( ImageState  s)
inlineprotectedvirtual

Process.5(Render).12: The border is rendered

Parameters
s

Reimplemented in ImageResizer.ImageBuilder.

Definition at line 588 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.RenderBorder().

588  {
589  if (exts != null)
590  foreach (AbstractImageProcessor p in exts)
591  if (p.RenderBorder(s) == RequestedAction.Cancel)
592  return RequestedAction.Cancel;
593  return RequestedAction.None;
594  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.RenderEffects ( ImageState  s)
inlineprotectedvirtual

Process.5(Render).3 Effects (such as a drop shadow or outer glow) are rendered

Parameters
s

Reimplemented in ImageResizer.Plugins.Basic.DropShadow.

Definition at line 487 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.RenderEffects().

487  {
488  if (exts != null)
489  foreach (AbstractImageProcessor p in exts)
490  if (p.RenderEffects(s) == RequestedAction.Cancel)
491  return RequestedAction.Cancel;
492  return RequestedAction.None;
493  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.RenderImage ( ImageState  s)
inlineprotectedvirtual

Process.5(Render).10: The image is copied to the destination parallelogram specified by ring 'image'.

Parameters
s

Reimplemented in ImageResizer.ImageBuilder, and ImageResizer.Plugins.Basic.SpeedOrQuality.

Definition at line 566 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.RenderImage().

566  {
567  if (exts != null)
568  foreach (AbstractImageProcessor p in exts)
569  if (p.RenderImage(s) == RequestedAction.Cancel)
570  return RequestedAction.Cancel;
571  return RequestedAction.None;
572  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.RenderOverlays ( ImageState  s)
inlineprotectedvirtual

Process.5(Render).15: Watermarks can be rendered here. All image processing should be done

Parameters
s

Reimplemented in ImageResizer.Plugins.Watermark.WatermarkPlugin.

Definition at line 623 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.RenderOverlays().

623  {
624  if (exts != null)
625  foreach (AbstractImageProcessor p in exts)
626  if (p.RenderOverlays(s) == RequestedAction.Cancel)
627  return RequestedAction.Cancel;
628  return RequestedAction.None;
629  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.
virtual RequestedAction ImageResizer.Resizing.AbstractImageProcessor.RenderPadding ( ImageState  s)
inlineprotectedvirtual

Process.5(Render).5 Image padding is drawn

Parameters
s

Reimplemented in ImageResizer.ImageBuilder.

Definition at line 509 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.Resizing.AbstractImageProcessor.RenderPadding().

509  {
510  if (exts != null)
511  foreach (AbstractImageProcessor p in exts)
512  if (p.RenderPadding(s) == RequestedAction.Cancel)
513  return RequestedAction.Cancel;
514  return RequestedAction.None;
515  }
RequestedAction
What to do about remaining handlers/methods for the specified section
AbstractImageProcessor()
Creates a new AbstractImageProcessor with no extensions
volatile IEnumerable< BuilderExtension > exts
Contains the set of extensions that are called for every method.

Member Data Documentation

volatile IEnumerable<BuilderExtension> ImageResizer.Resizing.AbstractImageProcessor.exts
protected

Contains the set of extensions that are called for every method.

Definition at line 50 of file AbstractImageProcessor.cs.

Referenced by ImageResizer.ImageBuilder.Copy().


The documentation for this class was generated from the following file: