JSON API - Job imageflow_job responds to these message methods ## v0.1/get_image_info Example message body: { "io_id": 0 } Example response: { "code": 200, "success": true, "message": null, "data": { "image_info": { "preferred_mime_type": "image/png", "preferred_extension": "png", "frame_count": 1, "current_frame_index": 0, "image_width": 640, "image_height": 480, "frame_decodes_into": "bgr_24" } } } ## v0.1/tell_decoder Example message body: { "io_id": 2, "command": { "jpeg_downscale_hints": { "width": 1000, "height": 1000, "scale_luma_spatially": true, "gamma_correct_for_srgb_during_spatial_luma_scaling": true } } } Example response: { "code": 200, "success": true, "message": null, "data": "none" } ## v0.1/execute Example message body (with graph): { "no_gamma_correction": null, "graph_recording": null, "framewise": { "graph": { "nodes": { "0": { "decode": { "io_id": 0, "commands": null } }, "5": { "encode": { "io_id": 2, "preset": { "libjpegturbo": { "quality": 90 } } } }, "2": { "copy_rect_to_canvas": { "from_x": 0, "from_y": 0, "width": 100, "height": 100, "x": 0, "y": 0 } }, "3": { "resample_1d": { "scale_to_width": 100, "transpose_on_write": false, "interpolation_filter": null } }, "1": { "create_canvas": { "format": "bgra_32", "w": 200, "h": 200, "color": "transparent" } }, "4": { "encode": { "io_id": 1, "preset": { "libpng": { "depth": "png_24", "matte": { "srgb": { "hex": "999999" } }, "zlib_compression": null } } } } }, "edges": [ { "from": 0, "to": 2, "kind": "input" }, { "from": 1, "to": 2, "kind": "canvas" }, { "from": 2, "to": 3, "kind": "input" }, { "from": 3, "to": 4, "kind": "input" }, { "from": 3, "to": 5, "kind": "input" } ] } } }Example message body (with linear steps): { "no_gamma_correction": null, "graph_recording": null, "framewise": { "steps": [ { "decode": { "io_id": 0, "commands": [ { "jpeg_downscale_hints": { "width": 800, "height": 600, "scale_luma_spatially": false, "gamma_correct_for_srgb_during_spatial_luma_scaling": false } } ] } }, { "apply_orientation": { "flag": 7 } }, { "expand_canvas": { "left": 10, "top": 10, "right": 10, "bottom": 10, "color": { "srgb": { "hex": "FFEECCFF" } } } }, { "crop": { "x1": 10, "y1": 10, "x2": 650, "y2": 490 } }, { "fill_rect": { "x1": 0, "y1": 0, "x2": 8, "y2": 8, "color": "transparent" } }, "flip_v", "flip_h", "rotate_90", "rotate_180", "rotate_270", "transpose", { "resample_2d": { "w": 100, "h": 75, "down_filter": "Robidoux", "up_filter": "Ginseng", "hints": { "sharpen_percent": 10.0, "prefer_1d_twice": null } } }, { "resample_2d": { "w": 200, "h": 150, "down_filter": null, "up_filter": null, "hints": null } }, { "encode": { "io_id": 1, "preset": { "libjpegturbo": { "quality": 90 } } } } ] } } Example response: { "code": 200, "success": true, "message": null, "data": { "job_result": { "encodes": [ { "preferred_mime_type": "image/jpg", "preferred_extension": "jpg", "io_id": 2, "w": 200, "h": 200, "bytes": "elsewhere" } ] } } } Example failure response: { "code": 500, "success": false, "message": "Invalid internal state", "data": "none" }