25cef78bbd3cf3b2ba10067087831f4fd3cc03a5,mathics/builtin/image.py,ImageResize,apply_resize_width,#ImageResize#Any#Any#Any#Any#,300

Before Change


    def apply_resize_width(self, image, width, evaluation, options):
        "ImageResize[image_Image, width_Integer, OptionsPattern[ImageResize]]"
        shape = image.pixels.shape
        height = int((float(shape[0]) / float(shape[1])) * width.to_python())
        return self.apply_resize_width_height(image, width, Integer(height), evaluation, options)

    def apply_resize_width_height(self, image, width, height, evaluation, options):

After Change


        else:
            width = s
        w = self._get_image_size_spec(old_w, width)
        if w is None:
            return evaluation.message("ImageResize", "imgrssz", s)
        if s.has_form("List", 1):
            height = width
        else:
            height = Symbol("Automatic")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: mathics/Mathics
Commit Name: 25cef78bbd3cf3b2ba10067087831f4fd3cc03a5
Time: 2016-08-16
Author: 16sn6uv@gmail.com
File Name: mathics/builtin/image.py
Class Name: ImageResize
Method Name: apply_resize_width


Project Name: mathics/Mathics
Commit Name: da735616b83af99dc3a16edee3055527e379d93d
Time: 2016-08-16
Author: 16sn6uv@gmail.com
File Name: mathics/builtin/image.py
Class Name: RandomImage
Method Name: apply


Project Name: mathics/Mathics
Commit Name: cb8696c6423412b14f4375be35819a5be4526bd2
Time: 2016-08-16
Author: 16sn6uv@gmail.com
File Name: mathics/builtin/image.py
Class Name: ImageRotate
Method Name: apply