def im_getsize(path_in):
    cmd = [b'identify', b'-format', b'%w %h',
           util.syspath(path_in, prefix=False)]
    try:
        out = util.command_output(cmd)
    except subprocess.CalledProcessError as exc:
        log.warn(u'ImageMagick size query failed')
        log.debug(
            u'`convert` exited with (status {}) when '
            u'getting size with command {}:\n{}',
            exc.returncode, cmd, exc.output.strip()
        )
        return
    try:
        return tuple(map(int, out.split(b' ')))
    except __HOLE__:
        log.warn(u'Could not understand IM output: {0!r}', out)
dataset/ETHPy150Open beetbox/beets/beets/util/artresizer.py/im_getsize