Scale image
        :param resource: Image
        :return: Image

def _scale(self, resource):
        """
        Scale image
        :param resource: Image
        :return: Image
        """
        original_width, original_height = resource.size

        target_width = int(round(original_width * self.value))
        target_height = int(round(original_height * self.value))

        resource_format = resource.format
        resource = resource.resize((target_width, target_height), Image.ANTIALIAS)
        resource.format = resource_format

        return resource