brown.interface.images

methods

dpi_to_dpm (dpi) permalink view source

Convert a Dots Per Inch value to Dots Per Meter

arguments:

dpi (int): A Dots Per Inch value

returns:

int: A Dots Per Meter value

autocrop (q_image, q_color) permalink view source

Automatically crop a qt image around the pixels not of a given color.

arguments:

q_image (QImage):

q_color (QColor):

returns:

QImage: A newly cropped Qt image. The passed-in image is left unmodified.