def test_stack_halign_center(): im1 = open_image('imgs/baseimg.jpg') im2 = open_image('imgs/anotherimg.jpg') result = stack(im1, im2, 'RGB', halign='center') expected = open_image('imgs/halign_center_stack_result.jpg') return result, expected
def test_stack_halign_right_bottom_img_larger(): im1 = open_image('imgs/anotherimg.jpg') im2 = open_image('imgs/baseimg.jpg') result = stack(im1, im2, 'RGB', halign='right') expected = open_image('imgs/halign_right_bottom_larger_stack_result.jpg') return result, expected
def test_stack_top_img_larger(): im1 = open_image('imgs/baseimg.jpg') im2 = open_image('imgs/anotherimg.jpg') result = stack(im1, im2, 'RGB', halign='left') expected = open_image('imgs/halign_left_stack_result.jpg') return result, expected
def test_both_stack_and_side_by_side(): im1 = open_image('imgs/baseimg.jpg') im2 = open_image('imgs/anotherimg.jpg') result1 = stack(im1, im2, 'RGB', halign='center') result_final = side_by_side(result1, im2, 'RGB', valign='top') expected = open_image('imgs/stack_and_side_by_side.jpg') return result_final, expected