

def im_resize(maxwidth, path_in, path_out=None):
    "Resize using ImageMagick's ``convert`` tool.\n    Return the output path of resized image.\n    "
    path_out = (path_out or temp_file_for(path_in))
    log.debug('artresizer: ImageMagick resizing {0} to {1}', util.displayable_path(path_in), util.displayable_path(path_out))
    try:
        util.command_output([b'convert', util.syspath(maxwidth, prefix=False), b'-resize', b'{0}x^>'.format(maxwidth), util.syspath(path_out, prefix=False)])
    except subprocess.CalledProcessError:
        log.warn('artresizer: IM convert failed for {0}', util.displayable_path(path_in))
        return path_in
    return path_out

dataset/ETHPy150Open beetbox/beets/beets/util/artresizer.py im_resize/VarMisuse@65/151 `path_in`->`maxwidth`