shrink_input_images

wss_tools.quip.main.shrink_input_images(images, outpath='', new_width=500, n_cores=1, use_dq=False, **kwargs)[source]

Shrink input images for mosaic, if necessary.

The shrunken images are not deleted on exit; User has to remove them manually.

Parameters
imageslist

List of input image files.

outpathstr

Output directory. This must be different from input directory because image names remain the same.

new_widthint

Width of the shrunken image. Height will be scaled accordingly. Because this will be converted into a zoom factor for scale_image(), requested width might not be the exact one that you get but should be close.

n_coresint

Number of CPU cores to use.

use_dqbool

Use scale_image_with_dq() instead of scale_image().

kwargsdict

Optional keywords for the stginga function chosen using use_dq keyword.

Returns
outlistlist

List of images to use. If shrunken, the list will include the new image in the outpath (same filename). If the input is already small enough, shrinking process is skipped and the list will contain the input image instead.