def split(self, fragment_height):
passes = int(math.ceil(self.height/fragment_height))<EOL>fragments = []<EOL>for n in range(<NUM_LIT:0>, passes):<EOL><INDENT>left = <NUM_LIT:0><EOL>right = self.width<EOL>upper = n * fragment_height<EOL>lower = min((n + <NUM_LIT:1>) * fragment_height, self.height)<EOL>box = (left, upper, right, lower)<EOL>fragments.append(self.img_original.crop(box))<EOL><DEDENT>return fragments<EOL>
Split an image into multiple fragments after fragment_height pixels

:param fragment_height: height of fragment
:return: list of PIL objects