imgwrench.commands package

Submodules

imgwrench.commands.blackwhite module

Convert color images to black and white.

imgwrench.commands.blackwhite.blackwhite(image)[source]

Convert color images to black and white.

imgwrench.commands.colorfix module

Fix colors of images by stretching their channel histograms to full range.

imgwrench.commands.colorfix.colorfix_fixed_cutoff(img, lower_cutoff, upper_cutoff)[source]

Fix colors by stretching channel histograms between given cutoff colors to full range.

imgwrench.commands.colorfix.colorfix_quantiles(img, level=0.01)[source]

Fix colors by stretching channel histograms between given quantiles to full range.

imgwrench.commands.colorfix.colorfix_quantiles_fixed_cutoff(img, level, lower_cutoff, upper_cutoff)[source]

Fix colors by stretching channel histogram between inner values of given quantiles and cutoff colors to full range.

imgwrench.commands.colorfix.quantiles(img, level=0.01)[source]

Compute high and low quantiles to the given level

imgwrench.commands.colorfix.stretch_histogram(img, cutoffs)[source]

Stretch channel histograms between given cutoffs to full range.

imgwrench.commands.crop module

Crop images to the given aspect ratio.

imgwrench.commands.crop.crop(image, aspect_ratio)[source]

Crop images to the given aspect ratio.

imgwrench.commands.frame module

Put a monocolor frame around images.

imgwrench.commands.frame.frame(image, width, color)[source]

Put a monocolor frame around images.

imgwrench.commands.resize module

Resize images to a maximum side length preserving aspect ratio.

imgwrench.commands.resize.resize(image, maxsize)[source]

Resize image to maxsize (longer) side length preserving aspect ratio.

imgwrench.commands.save module

No-op to enable saving of images using imgwrench without processing.

imgwrench.commands.stack module

Stack images vertically, empty space in the middle.

imgwrench.commands.stack.stack(img1, img2, width, height)[source]

Stack images vertically, empty space in the middle.

Module contents