My Image has Dark Borders Around It
Border Removal Options
BorderRemovalOptions has a number of options for removing dark borders from an image, such as those caused by overscan on a dark background. The options for removal include removing the border by reducing the image size, cutting off the dark areas, or replacing the border with white, leaving the image size the same. If your border is irregular, such as a folded corner, below, then a combination of the two options may be desirable.
Example of Border Removal:
Other Options
With pages that are not straight, such as shown above, removing the border will not work well, as CropBorder only cuts along horizontal and vertical lines. While replacing the border would bleach this remainder out, in almost all cases it is desirable to turn on the DeskewBorder operation as well, which will attempt to detect the amount of rotation by looking at the edges of the border, and straighten the image to provide a better crop.
CropBorder does not require deskew, as it handles edges that are irregular or at an angle, but using deskew at this point may be a better option than a separate deskew operation; first, because doing the two operations at once is usually faster, and second, because the existence of a document edge allows skew detection to work even if there is little or no content usable by the standard skew detection within the page. All three options can be used together, which will straighten the image, cut off the dark border, and bleach out any remaining dark data along the edges.