Inscribed Circles
You can edit code on OBS Console or make an API call to get an inscribed circle of an image.
Choose the image center as the center of a circle, and crop the image according to the specified radius. The image then is cropped into a circle. Table 1 describes the parameters.
This operation is represented by circle.
Parameter |
Value Description |
Code Example |
---|---|---|
r |
Radius specified for the inscribed circle. Its value ranges from 0 to Half of the image's short side. |
image/circle,r_100 |
- If the output format is set to JPG, the area outside the inscribed circle is white. If the output format is set to a vector format such as PNG, WebP, or BMP, the area outside the inscribed circle is transparent. PNG is the recommended output format.
- Even if r is larger than half of the short side, the generated inscribed circle is still the image's largest inscribed circle (with a radius equal to half of the short side).
Example
Set the radius to 100 and output format to jpg (with the area outside the inscribed circle being white).
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot