DEXTUpload.NET
Enumeration ImageHorizontalAlignment
- The minimum supported version
- 5.0.0.0
- The minimum support environment
- .NET Framework 4.0
- Explanation
-
The "ImageHorizontalAlignment" enumeration determines the horizontal poistion for fitting a image into the specified frame with a "DEXTUpload.NET.ImageFitOption" together.
This enumeration is used only in the case of "ImageFitOption.UniformToFit" or "ImageFitOption.UniformToFill".
var source = new FileInfo("source.jpg"); using (var img = ImageProc.Fit(source, new FittingOption { Width = 100, Height = 200, Fit = ImageFitOption.UniformToFit, BackgroundColor = Color.Red, // If left and right margins are found, fit in with the right side and fill the left margin with the background color. HorizontalAlign = ImageHorizontalAlignment.Right })) { ImageProc.SaveImage(img, new FileInfo("output.jpg"), new ImageSaveOption { IsOverwrite = true }); }
- Type
-
public enum ImageHorizontalAlignment
- Members
-
Left
-
Based on the left side.
If the "Fit" property is "ImageFitOption.UniformToFit"
Source Frame Result If the "Fit" property is "ImageFitOption.UniformToFill"
Source Frame Result
Center
-
Based on the center.
If the "Fit" property is "ImageFitOption.UniformToFit"
Source Frame Result If the "Fit" property is "ImageFitOption.UniformToFill"
Source Frame Result
Right
-
Based on the right side.
If the "Fit" property is "ImageFitOption.UniformToFit"
Source Frame Result If the "Fit" property is "ImageFitOption.UniformToFill"
Source Frame Result
-