Exemple #1
0
def image(image_id):
    size = request.args.get('size', 'x512')
    dimensions = image_handler.get_dimensions(image_id, size)
    rows,cols = image_handler.get_rows_cols(image_id, size)
    to_return = get_image_obj(image_id, size, dimensions, rows, cols)

    response = make_response()
    response.data = json.dumps(to_return)
    response.mimetype = 'application/json'

    return response
Exemple #2
0
def render(image_id):
    size = request.args.get('size', 'x512')
    dimensions = image_handler.get_dimensions(image_id, size)
    configurations = image_handler.get_configurations(image_id)
    manifest = convert_manifest(image_id, image_handler.load_manifest(image_id))
    
    return render_template('render.html',
                            manifest=json.dumps(manifest), 
                            dimensions=dimensions, 
                            image_name=image_id, 
                            size=size,
                            configurations=configurations)