9516115f722fb3f95882553d8077bf1ab4a670ef,examples/web_demo/exifutil.py,,open_oriented_im,#Any#,19

Before Change


        if exif is not None and 274 in exif:
            orientation = exif[274]
            im = apply_orientation(im, orientation)
    return np.asarray(im).astype(np.float32) / 255.


def apply_orientation(im, orientation):
    if orientation in ORIENTATIONS:

After Change


            im = apply_orientation(im, orientation)
    img = np.asarray(im).astype(np.float32) / 255.
    if img.ndim == 2:
        img = img[:, :, np.newaxis]
        img = np.tile(img, (1, 1, 3))
    elif img.shape[2] == 4:
        img = img[:, :, :3]
    return img


def apply_orientation(im, orientation):
    if orientation in ORIENTATIONS:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: BVLC/caffe
Commit Name: 9516115f722fb3f95882553d8077bf1ab4a670ef
Time: 2014-08-26
Author: sergeykarayev@gmail.com
File Name: examples/web_demo/exifutil.py
Class Name:
Method Name: open_oriented_im


Project Name: GPflow/GPflow
Commit Name: d1ac7b831ad36cd0e4bdd7980819f83208345148
Time: 2018-02-07
Author: alex.ialongo@gmail.com
File Name: gpflow/expectations.py
Class Name:
Method Name: _expectation


Project Name: BVLC/caffe
Commit Name: 7014bfb976524e95b6e13eb44cf62401568bff1a
Time: 2014-08-26
Author: sergeykarayev@gmail.com
File Name: examples/web_demo/exifutil.py
Class Name:
Method Name: open_oriented_im