def _get_thumbnail_options(self, context, instance):
        width, height = None, None
        subject_location = False
        placeholder_width = context.get('width', None)
        placeholder_height = context.get('height', None)
        if instance.use_autoscale and placeholder_width:
            width = int(placeholder_width)
        if instance.use_autoscale and placeholder_height:
            height = int(placeholder_height)
        elif instance.width:
            width = instance.width
        if instance.height:
            height = instance.height
        if instance.image:
            if instance.image.subject_location:
                subject_location = instance.image.subject_location
            if not height and width:
                height = int(float(width) * float(instance.image.height) / float(instance.image.width))
            if not width and height:
                width = int(float(height) * float(instance.image.width) / float(instance.image.height))
            if not width:
                width = instance.image.width
            if not height:
                height = instance.image.height
        return {'size': (width, height),
                'subject_location': subject_location}