RasterImageNormalizeAngle Method (Boolean, Color) |
Namespace: Aspose.ImagingAssembly: Aspose.Imaging (in Aspose.Imaging.dll) Version: 22.05
Syntaxpublic virtual void NormalizeAngle(
bool resizeProportionally,
Color backgroundColor
)
Public Overridable Sub NormalizeAngle (
resizeProportionally As Boolean,
backgroundColor As Color
)
public:
virtual void NormalizeAngle(
bool resizeProportionally,
Color backgroundColor
)
abstract NormalizeAngle :
resizeProportionally : bool *
backgroundColor : Color -> unit
override NormalizeAngle :
resizeProportionally : bool *
backgroundColor : Color -> unit
Parameters
- resizeProportionally
- Type: SystemBoolean
if set to true you will have your image size changed according to rotated rectangle (corner points) projections in other case that leaves dimensions untouched and only internal image contents are rotated. - backgroundColor
- Type: Aspose.ImagingColor
Color of the background.
ExamplesSkew is an artifact that might appear during document scanning process when the text/images of the document get rotated at a slight angle. It can have various causes but the most common is that the paper get misplaced during a scan. Therefore, deskew is the process of detecting and fixing this issue on scanned files(i.e. bitmap) so deskewed documents will have the text/images correctly and horizontally adjusted.
[C#]
string dir = "c:\\aspose.imaging\\issues\\net\\3567\\";
string inputFilePath = dir + "skewed.png";
string outputFilePath = dir + "skewed.out.png";
using (Aspose.Imaging.RasterImage image = (Aspose.Imaging.RasterImage)Aspose.Imaging.Image.Load(inputFilePath))
{
image.NormalizeAngle(false , Aspose.Imaging.Color.LightGray );
image.Save(outputFilePath);
}
See Also