Fixed the method to get an image from the camera intent, now it works!