Cropping a camera image

Hi,

I have tried to implement a change profile picture cropping it, but I cant do it properly. Someone has a working example?

Thanks!