On github there is a Java library for that: https://github.com/rkalla/imgscalrhttps://github.com/rkalla/imgscalr
But you still need to create the widget yourself though.
Regards,
Ronald