October 2012

Leptonica Tutorial – Cropping

Common use is to crop to certain area of an image, this can be quite easily accomplished with following code. BOX* box = boxCreate(x, y, w, h); PIX* dpix= pixClipRectangle(spix, box, NULL);BOX* box = boxCreate(x, y, w, h); PIX* dpix= pixClipRectangle(spix, box, NULL);