None yet

getMargins(canvas)

Arguments

canvas

A N dimensional matrix (product of png::readPNG()) corresponding to bitmap image.

Value

A named 4 vector containing top, right, bottom and left margins

Details

None yet

Author

Dave Braze <davebraze@gmail.com>

Examples

    cnvs <- system.file("extdata/story01.png", package="FDBeye")
    cnvs <- png::readPNG(cnvs)
    fcnvs <- apply(cnvs, c(1,2), sum) # flatten to a single plane for convenience

    ## get margins
    getMargins(fcnvs)
#> Warning: the condition has length > 1 and only the first element will be used
#>    top  right bottom   left 
#>     72   1026    832    215