Converts a the file returned by
        :py:class:`django.db.models.fields.ImageField` to a PIL image.

        :param django_file: django file
        :type django_file: :py:class:`django.db.models.fields.files.FieldFile`
        :rtype: :py:class:`PIL.Image.Image`

def django_file_to_pil_image(self, django_file):
        '''
        Converts a the file returned by
        :py:class:`django.db.models.fields.ImageField` to a PIL image.

        :param django_file: django file
        :type django_file: :py:class:`django.db.models.fields.files.FieldFile`
        :rtype: :py:class:`PIL.Image.Image`
        '''
        django_file.open()
        pil_image = Image.open(django_file.file)
        return pil_image