D
D
Dantes5892020-03-02 10:14:37
JavaScript
Dantes589, 2020-03-02 10:14:37

How to crop an avatar?

Good afternoon, please tell me how to make a real photo crop with coordinates, width and height as in this Demo? That is, you just need to select the image area and be able to reduce and expand
https://kirill3333.github.io/react-avatar/
You can use native JS or React, without libraries.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xmoonlight, 2020-03-02
@xmoonlight

On react and without libraries... I
remembered the dialogue from "Alice..." (featured film):

- We need to split up...
- So, let's split up...
- BUT! TOGETHER!

On the Internet, solutions with lessons are just in bulk. Apparently, react took all the resources))

W
whoame, 2020-03-02
@whoame

By entering crop image js/react into Google, 100500 libraries are displayed, you look at what suits and you use.
Apparently the author was confused by the fact that you need to make it round. In fact, the square picture is cut off and the radius is rounded off at the front through the border

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question