This function is an implementation of bwcrop
This has been modified to work on any format including color images.
An excerpts of Doxygen comment from the header
* Given four "corner points" in the input file, this function saves
* an output file of the requested size consisting of the nearest
* pixels. No filtering/interpolating is done.
* This function can handle image of all depths.
* @param img Input Image to be cropped
* @param p1 Lower Left point
* @param p2 Lower Right point
* @param p3 Upper Left point
* @param p4 Upper Right point
* @param xnum Width of the output image
* @param ynum Height of the output image
* @param output_filename Filename of image to be saved
* @param format File Format of the ouput file in ICV_IMAGE_
this function is added to src/libicv/crop.c
This is updated version of the patch because of the latest changes in icv.h (addition of comments in revision 55816)
This patch was written before deciding the icv_structure. This can be closed without applying.