def image_resize(file_paths, new_dir, width, height):
if new_dir[-<NUM_LIT:1>] != '<STR_LIT:/>':<EOL><INDENT>new_dir += '<STR_LIT:/>'<EOL><DEDENT>if not os.path.exists(os.path.dirname(new_dir)):<EOL><INDENT>os.makedirs(os.path.dirname(new_dir))<EOL><DEDENT>for f in tqdm.tqdm(file_paths):<EOL><INDENT>img = Image.open(f).resize((width, height), Image.ANTIALIAS).convert('<STR_LIT>')<EOL>new = os.path.join(new_dir, os.path.basename(f))<EOL>img.save(new)<EOL><DEDENT>
Resizes all images with given paths to new dimensions.
        Uses up/downscaling with antialiasing.

    Parameters
    ----------
    file_paths : List[str]
        List of path strings for image to resize.
    new_dir : str
        Directory to place resized images.
    width : int
        Target width of new resized images.
    height : int
        Target height of new resized images.