
ImageR.crop(geoR)Then we want to write a page number in the bottom of each page. It is the half of the long bottom page side and that is w.ĭim geoR As New GMGeometryMBS(w, h, w, 0)With the method crop we cut out the pages. The right side has the same size but the x position is different. For the left side we only need the height and width of the output. That’s why we don’t need to set the coordinates for the left mask. The default position coordinates are 0/0. In the parameters we can defined the height and width of the cropping rectangle and optional the position of the top left edge coordinates. The clipping area is defined as GMGeometryMBS object.
#Xojo mbs mask text full
Therefore we need the full height of the sheet but only half the width. We imagine we have a Din A4 paper on which two pages are printed. Instead of loading the file twice, we use the copy constructor to get two identical image objects.ĭim imageR As New GMImageMBS(imageL) // copy constructorIf no exception is raised, we determine the height and width of the target pictures. One for the Left side (imageL) and one to the right side (imageR). …We load the current file in two GMImage Objects. SortedFilesMBS(False, True, False)Then we want to loop over this array and cut the pages: My scanned documents are names Scan_1, Scan_2 and so on.ĭim folder As FolderItem = ("Scan")ĭim files() As FolderItem = folder. In the parameters of this method, we can set as the second Parameter that we want to sort the array by filenames. With the method SortedFilesMBS we get an array that is sorted by name already. For that we query the folder items to an array.

At first we load the scanned pictures from a folder to our application.
#Xojo mbs mask text how to
In this article I want to show you how to cut the pages and set a serial page number at the bottom of each page. Compared to Xojo pictures, we can work even with 16bit color depth here and use exact same functions cross platform. With the classes in this plugin you can do a lot of graphic editing, like using graphics effects, add text on an image or crop an image by a given area.

Our Xojo Plugins includes a GraphicsMagick plugin. The MBS Xojo Plugins can help you with this problem in Xojo. Have you ever had the problem that you scan documents that’s are printed with two pages on each side and you need this document as a single page Document? Crop a two side page document to a single page document
