def resize(image_url, dimensions, format=None, quality=80, fill=False,
           bgcolor=None, upscale=True, progressive=True, anchor='center',
           placeholder=False):
    if current_app.config['RESIZE_NOOP']:
        return image_url

    use_placeholder = placeholder
    resize_root = current_app.config['RESIZE_ROOT']
    resize_url = current_app.config['RESIZE_URL']

    if not image_url:
        if use_placeholder:
            placeholder_reason = 'empty image path'
            image_url = 'empty-image-path'
        else:
            raise exc.EmptyImagePathError()
    else:
        placeholder_reason = None

    root_relative_path = _extract_relative_path(resize_url, image_url)
    original_path = os.path.join(resize_root, root_relative_path)

    if os.path.isfile(original_path):
        _, _, filename = image_url.rpartition('/')
        placeholder_reason = None
    else:
        if use_placeholder:
            placeholder_reason = u'"{}" does not exist.'.format(original_path)
            image_url = safe_placeholder_filename(placeholder_reason)
            filename = image_url
        else:
            raise exc.ImageNotFoundError(original_path)

    width, height = parse_dimensions(dimensions)
    anchor = _parse_anchor(anchor)
    format = _parse_format(image_url, format)
    cache_path_args = root_relative_path.rpartition('/')[0].split('/')
    cache_path_args.extend([
        str(quality) if format == JPEG else '',
        width or 'auto',
        height or 'auto',
        anchor.lower().replace('_', '-') if fill else '',
        'fill' if fill else 'no-fill',
        'upscale' if upscale else 'no-upscale',
        parse_rgb(bgcolor, include_number_sign=False) if bgcolor else '',
    ])

    cache_path = _construct_relative_cache_path(
        filename, format.lower(), *cache_path_args,
        cache_dir=current_app.config['RESIZE_CACHE_DIR'],
        hash_filename=current_app.config['RESIZE_HASH_FILENAME'],
        hash_method=current_app.config['RESIZE_HASH_METHOD'])

    full_cache_url = os.path.join(resize_url, cache_path)
    full_cache_path = os.path.join(resize_root, cache_path)

    if fill and not all([width, height]):
        raise exc.MissingDimensionsError('Fill requires both width and height '
                                         'to be set.')

    if not os.path.exists(full_cache_path):
        generate_image(inpath=original_path, outpath=full_cache_path,
                       format=format, width=width, height=height,
                       bgcolor=bgcolor, upscale=upscale, fill=fill,
                       anchor=anchor, quality=quality, progressive=progressive,
                       placeholder_reason=placeholder_reason)

    return full_cache_url
Returns the name of the search job, which is the search ID (SID).
dataset/ETHPy150Open jmagnusson/Flask-Resize/flask_resize/__init__.py/resize--crossover with--dataset/ETHPy150Open hvandenb/splunk-elasticsearch/search-elasticsearch/bin/splunklib/client.py/Job.name