CROP is the jGraph module of jLab.

 CROP  Gets rid of whitespace around an image. [by A. Bliss]
 
    CROP(FILENAME,APPEND,MARGIN) is the full calling form. APPEND and
       MARGIN are optional inputs.
 
    CROP('filename.ext') crops the image in the file and saves it using
    the original filename, overwriting the old image. The extension (ext)
    can be anything IMREAD supports.
 
    CROP(directory) crops all images in a directory. 
 
    If APPEND is 1, CROP saves the cropped image as 'filename_crop.ext'
    in the same directory as the original.
 
    MARGIN sets the margin width in pixels (default is 10).
 
    Changes since version 1:
        1. Now accepts directories as input.
        2. Improved input checks and comments.
        3. Handles transparency in .png files.
        4. Just prior to saving version 1, I added the APPEND option.
 
    Example:
        crop('C:\MATLAB7\toolbox\matlab\demos\html\cruller_01.png',1)
 
    See also: IMREAD, IMWRITE
    See crop_license.m for the license details.
    Written by Andy Bliss Sept 8th, 2006. Revised May 31, 2012.
    __________________________________________________________________
    This third-party software is included with JLAB for convenience, in
    accordance with the redistribution policy at crop_license.m.

contents | allhelp | index