def METHOD_NAME(self, img):
    h, w, r = img.shape
    if h > w:
        nh = self.MAX_SIZE
        nw = nh * w / h
    else:
        nw = self.MAX_SIZE
        nh = nw * h / w
    img = cv2.resize(img, (nw, nh))
    # return img
    rep = np.ones(nw, dtype=np.int64)
    reph = np.ones(nh, dtype=np.int64)
    emtpy_slots = self.IMAGE_SIZE - nw
    empty_slots_h = self.IMAGE_SIZE - nh
    half_empty_slots = emtpy_slots / 2 + 1
    half_empty_slots_h = empty_slots_h / 2 + 1
    reph[0] = half_empty_slots_h
    reph[-1] = half_empty_slots_h
    rep[0] = half_empty_slots
    rep[-1] = half_empty_slots
    if emtpy_slots % 2 == 1:
        rep[-1] += 1
    if empty_slots_h % 2 == 1:
        reph[-1] += 1
    img = np.repeat(img, reph, axis=0)
    return np.repeat(img, rep, axis=1)