BitmapDataExtensionsResize(IReadableBitmapData, Size, ScalingMode, Boolean, ParallelConfig) Method
Resizes the specified source.
Namespace: KGySoft.Drawing.ImagingAssembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 10.0.0-rc.1
public static IReadWriteBitmapData? Resize(
this IReadableBitmapData source,
Size newSize,
ScalingMode scalingMode,
bool keepAspectRatio,
ParallelConfig? parallelConfig
)
<ExtensionAttribute>
Public Shared Function Resize (
source As IReadableBitmapData,
newSize As Size,
scalingMode As ScalingMode,
keepAspectRatio As Boolean,
parallelConfig As ParallelConfig
) As IReadWriteBitmapData
public:
[ExtensionAttribute]
static IReadWriteBitmapData^ Resize(
IReadableBitmapData^ source,
Size newSize,
ScalingMode scalingMode,
bool keepAspectRatio,
ParallelConfig^ parallelConfig
)
[<ExtensionAttribute>]
static member Resize :
source : IReadableBitmapData *
newSize : Size *
scalingMode : ScalingMode *
keepAspectRatio : bool *
parallelConfig : ParallelConfig -> IReadWriteBitmapData
- source IReadableBitmapData
- The source IReadableBitmapData to resize.
- newSize Size
- The requested new size.
- scalingMode ScalingMode
- A ScalingMode value, which determines the quality of the result as well as the processing time.
- keepAspectRatio Boolean
- to keep aspect ratio of the specified source; otherwise, .
- parallelConfig ParallelConfig
- The configuration of the operation such as parallelization, cancellation, reporting progress, etc.
When Progress is set in this parameter,
then this library always passes a DrawingOperation instance to the generic methods of
the IAsyncProgress interface.
If , then the degree of parallelization is configured automatically.
IReadWriteBitmapDataAn
IReadWriteBitmapData, which is the resized version of the specified
source, or
, if the operation
was canceled and the
ThrowIfCanceled property
of the
parallelConfig parameter was
.In Visual Basic and C#, you can call this method as an instance method on any object of type
IReadableBitmapData. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).