def im_resize(maxwidth, path_in, path_out=None):
    path_out = path_out or temp_file_for(path_in)
    log.debug(u'artresizer: ImageMagick resizing {0} to {1}',
              util.displayable_path(path_in), util.displayable_path(path_out))

    # "-resize widthxheight>" shrinks images with dimension(s) larger
    # than the corresponding width and/or height dimension(s). The >
    # "only shrink" flag is prefixed by ^ escape char for Windows
    # compatibility.
    try:
        util.command_output([
            b'convert', util.syspath(path_in, prefix=False),
            b'-resize', b'{0}x^>'.format(maxwidth),
            util.syspath(path_out, prefix=False),
        ])
    except subprocess.CalledProcessError:
        log.warn(u'artresizer: IM convert failed for {0}',
                 util.displayable_path(path_in))
        return path_in
    return path_out
Returns a ctime string.
dataset/ETHPy150Open beetbox/beets/beets/util/artresizer.py/im_resize--crossover with--dataset/ETHPy150Open KoffeinFlummi/Chronyk/chronyk/chronyk.py/Chronyk.ctime