doc-pic

KOSTENLOS
Durch Silvester Maraž | Aktualisiert 2 months ago | Video, Images
Popularität

5.3 / 10

Latenz

1,296ms

Service Level

100%

Health Check

N/A

Zurück zu allen Tutorials (1)

Workflow

Cutting an image to size is a 2/3 step workflow.

1. Get a preset

Presets can be found with api call called presets(GET). The identifier is used to for image generation. Label will give some extra information for its usage.

Presets can also be generated by the user. The api call preset_new(POST) will create a new preset for the user namespace.

2. Capture a face

An image can be uploaded to the call capture(POST). If any face is find it will return a session and information about found faces in the picture. The session and the face identifier is used to cut and create a document picture in the 3. step. A 404 will be returned if the picture cannot be used.

3. Cut the picture

Cutting an image to size happens in the call cut(POST). The call takes the preset identifier from 1. step and the face id and session from the 2. step.
{ "session": "4641-69d06caf-fbb2-4795-8dfd-5617c993a461", "face": 0, "preset": "4641-69d06caf-fbb2-4795-8dfd-5617c993a461" }

As a return value it will give an url to the created picture. The endpoint show(GET) can also be used for getting images. File names for this api are: single.jpg, pack.png and face-$number.png.