PeachImage
PeachImage.Image
Image.Resize(int, int, ResizeOptions) Method
Creates a resized copy of this image using the given target dimensions and resampling filter. Does not modify this instance (same non-mutating contract as Clone()) — except when options’s Mode is Max and this image already fits within width x height, or when it’s Crop/Pad and this image is already exactly width x height, in which case this same instance is returned unchanged rather than allocating a needless copy. Because of that fast path, the returned Image may be <em>this same instance</em> rather than an independent one — disposing one of the two references then makes the other throw System.ObjectDisposedException on its next access, same as disposing any other shared reference twice would. If you need the source and the resized result to have independent lifetimes regardless of which path is taken, dispose only after you’re done with both, or check System.Object.ReferenceEquals(System.Object,System.Object) first.
public PeachImage.Image Resize(int width, int height, PeachImage.ResizeOptions? options=null);
Parameters
width System.Int32
height System.Int32
options ResizeOptions