fork from https://github.com/danielebogo/DBCamera