ImageTaskBase<T>.ResizeWidth Method
Definition
- Namespace
- GleamTech.ImageUltimate
- Assembly
- GleamTech.ImageUltimate.dll
Resizes the current image to the given width while preserving the aspect ratio. This is a shortcut to calling Resize(int, int, ResizeMode) method with 0 for height value. The command is added to the chain and not executed until the actual processing is done.
public T ResizeWidth(int width, ResizeMode resizeMode = ResizeMode.Max)
Parameters
widthintThe desired width of the resulting image. Height will be automatically calculated to preserve aspect ratio. Value will be treated as percentage when Percentage is used.
resizeModeResizeModeThe resize mode which is used to determine the resulting width and height and resolve aspect ratio differences.
Returns
- T
The same instance of this class.