Return directly image data instead of saving it into a file.