Skip to content

Instantly share code, notes, and snippets.

@ESidenko ESidenko/
Created Sep 15, 2019

What would you like to do?
Aspose.Imaging for Java
import com.aspose.imaging.Color;
import com.aspose.imaging.Image;
import com.aspose.imaging.RasterImage;
import com.aspose.imaging.examples.Utils;
public class Deskew
public static void main(String... args)
// The path to the documents directory.
String dataDir = "ModifyingImages/";
String fileName = "skewed.png";
String output = "skewed.out.png";
String inputFileName = dataDir + fileName;
// Get rid of the skewed scan with default parameters
try (RasterImage image = (RasterImage) Image.load(inputFileName))
image.normalizeAngle(false /*do not resize*/, Color.getLightGray() /*background color*/); + output);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.