- About Graphics Mill
- What's New?
- Breaking Changes in Graphics Mill 12
- Breaking Changes in Graphics Mill 11
- Features
- Supported File Formats
- System Requirements
- Getting Started
- Working with Image Formats
- Transforming Images (Resize, Rotate, Crop)
- Working with Metadata
- Color Management and Color Reduction
- Drawing Text and Graphics
- Color Keying (Green Screen Removal)
- Channels and Pixel Data
- Color and Tone Correction
- Working with Photoshop (PSD) Files
- Image Filters
- Processing Large Images
- Basics of Image Processing
- Troubleshooting
- Class Library Reference
- Aurigma.GraphicsMill Namespace
- AmbiguousFontCollisionException Class
- Bitmap Class
- BitmapEmptyException Class
- BitmapStatisticsProvider Class
- Channel Enumeration
- ChannelCombiner Class
- ChannelSplitter Class
- ChannelsProvider Class
- CMAdobeModuleLoadException Class
- CMException Class
- CMInappropriateProfileException Class
- CMOpenProfileException Class
- CMTransformException Class
- Cmyk16Color Class
- CmykChannelCombiner Class
- CmykChannelSplitter Class
- CmykColor Class
- CodecAdapter Class
- Color Class
- ColorAdjustmentProvider Class
- ColorManagementProvider Class
- ColorPalette Class
- ColorPaletteEmptyException Class
- ColorPaletteType Enumeration
- ColorProfile Class
- ColorProfileClass Enumeration
- ColorSpace Enumeration
- CompressedImage Class
- CompressedStream Class
- Configuration Class
- DuplicateFamilyStyleException Class
- DuplicateFontAliasException Class
- DuplicatePostscriptNameException Class
- FamilyStyleConflict Class
- FontException Class
- FontMissingException Class
- GMException Class
- GraphicsContainerRasterizer Class
- Grayscale16Color Class
- GrayscaleChannelCombiner Class
- GrayscaleChannelSplitter Class
- GrayscaleColor Class
- Histogram Class
- HistogramMode Enumeration
- IImageDescriptor Interface
- IImageParams Interface
- Image Class
- ImageGenerator Class
- ImageParams Class
- IndexedColor Class
- Ink Class
- InvalidPropertyValueException Class
- InvalidSourceException Class
- Lab16Color Class
- LabChannelCombiner Class
- LabChannelSplitter Class
- LabColor Class
- MissingIndexColorException Class
- ObjectClosedException Class
- ObjectEmptyException Class
- OnInitEventArgs Class
- OutOfMemoryException Class
- Pipeline Class
- PipelineElement Class
- PipelineException Class
- PixelFormat Class
- PostscriptNameConflict Class
- ProgressEventArgs Class
- ProgressReporter Class
- Rational Class
- Rgb16Color Class
- RgbChannelCombiner Class
- RgbChannelSplitter Class
- RgbColor Class
- SehException Class
- SpotColor Class
- TransformException Class
- TransformsProvider Class
- TransformsProvider Members
- TransformsProvider Methods
- AddNoise Method
- ApplyBezier Method
- ApplyMatrix Method
- AutoCrop Method
- Blur Method
- Crop Method
- Cylindrize Method
- EdgeDetect Method
- Emboss Method
- Flip Method
- Invert Method
- Maximum Method
- Median Method
- Minimum Method
- Mosaic Method
- RemoveContiguousBackground Method
- RemoveGreenScreen Method
- Resize Method
- Resize Method (Size)
- Resize Method (Size, ResizeInterpolationMode)
- Resize Method (Size, ResizeMode)
- Resize Method (Int32, Int32)
- Resize Method (Size, ResizeInterpolationMode, ResizeMode)
- Resize Method (Int32, Int32, ResizeInterpolationMode)
- Resize Method (Int32, Int32, ResizeMode)
- Resize Method (Int32, Int32, ResizeInterpolationMode, ResizeMode)
- Rotate Method
- Shadow Method
- Sharpen Method
- SmartBlur Method
- Spray Method
- StackBlur Method
- Texturize Method
- Transparentize Method
- UnsharpMask Method
- TrialPeriodTimeException Class
- UnexpectedException Class
- Unit Enumeration
- UnitConverter Class
- UnsignedRational Class
- UnsupportedFontException Class
- UnsupportedPixelFormatException Class
- Win32Exception Class
- Aurigma.GraphicsMill.Codecs Namespace
- Aurigma.GraphicsMill.Codecs.ClippingPath Namespace
- Aurigma.GraphicsMill.Codecs.Psd Namespace
- Aurigma.GraphicsMill.Drawing Namespace
- Aurigma.GraphicsMill.Drawing.Art Namespace
- Aurigma.GraphicsMill.Drawing.Effects Namespace
- Aurigma.GraphicsMill.Licensing Namespace
- Aurigma.GraphicsMill.Templates Namespace
- Aurigma.GraphicsMill.Transforms Namespace
- Aurigma.GraphicsMill Namespace
- Licensing
- End User License Agreement
- Copyright Notices
TransformsProvider.Resize Method (Int32, Int32, ResizeInterpolationMode, ResizeMode)
Applies to: Graphics Mill 12.1, 6.x-12.x (may differ)
Resizes the bitmap to the specified dimensions using a given interpolation algorithm and resize mode.
Namespace:
Aurigma.GraphicsMill
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Syntax
C#
public void Resize(
int width,
int height,
ResizeInterpolationMode interpolationMode,
ResizeMode resizeMode
)
Parameters
- width
-
Type: System.Int32
The width of resized bitmap. If 0, it is calculated automatically to preserve the aspect ratio of the source image. Both width and height cannot be 0 at the same time.
- height
-
Type: System.Int32
The height of resized bitmap. If 0, it is calculated automatically to preserve the aspect ratio of the source image. Both width and height cannot be 0 at the same time.
- interpolationMode
-
Type: Aurigma.GraphicsMill.Transforms.ResizeInterpolationMode
A ResizeInterpolationMode interpolation algorithm which used during the resize.
- resizeMode
-
Type: Aurigma.GraphicsMill.Transforms.ResizeMode
A ResizeMode which specifies how to interpret the resize dimensions.
Remarks
You can also use Resize class to apply this transform.
Note
If certain values of resizeMode are specified, width and height of the result bitmap may be different than width and height arguments.
Examples
C#
using (var bitmap = new Bitmap(@"Images\in.jpg"))
{
bitmap.Transforms.Resize(100, 0, ResizeInterpolationMode.High, ResizeMode.Fit);
bitmap.Save(@"Images\Output\out.jpg");
}