doc-pic

무료
분류별 Silvester Maraž | 업데이트됨 2 mesi fa | Video, Images
인기

5.3 / 10

지연 시간

1,296ms

서비스 수준

100%

Health Check

N/A

모든 자습서로 돌아가기 (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.