                      if face.r != 0:
                          image = rotate_image(image, face.r)
                          image = converter.patch_image(image, face, 64 if "128" not in self.arguments.trainer else 128)
                          # TODO: This switch between 64 and 128 is a hack for now. We should have a separate cli option for size
                          image = rotate_image(image, face.r * -1)
                      else:
                          image = converter.patch_image(image, face, 64 if "128" not in self.arguments.trainer else 128)
                          # TODO: This switch between 64 and 128 is a hack for now. We should have a separate cli option for size
  
              output_file = get_folder(self.output_dir) / Path(filename).name
 
</s> remove         if self.arguments.rotate_images.lower() == 'on' and len(process_faces) == 0:
 </s> add         if self.rotation_angles is not None and len(process_faces) == 0: </s> remove         ''' rotates the image through 90 degree iterations to find a face '''
        angle = 90
        while angle <= 270:
            rotated_image = rotate_image(image, angle)
            faces = self.get_faces(rotated_image, rotation=angle)
            rotated_faces = [(idx, face) for idx, face in faces]
            if len(rotated_faces) != 0:
 </s> add         ''' rotates the image through rotation_angles to try to find a face '''
        for angle in self.rotation_angles:
            rotated_faces, rotated_image = self.getRotatedImageFaces(image, angle)
            if len(rotated_faces) > 0:
                        image = rotate_image(image, face.r * -1, rotated_width=width, rotated_height=height)
                      if face.r != 0:
                          image = rotate_image(image, face.r)
                          image = converter.patch_image(image, face, 64 if "128" not in self.arguments.trainer else 128)
                          # TODO: This switch between 64 and 128 is a hack for now. We should have a separate cli option for size
                        image = rotate_image(image, face.r * -1, rotated_width=width, rotated_height=height)
                      else:
                          image = converter.patch_image(image, face, 64 if "128" not in self.arguments.trainer else 128)
                          # TODO: This switch between 64 and 128 is a hack for now. We should have a separate cli option for size
  
              output_file = get_folder(self.output_dir) / Path(filename).name
keep keep keep keep replace keep keep keep keep keep
 Adds support for arbitrary image rotations (#309)

* Add support for user-specified rotation angle in extract

* Added rotation-angle-list option to enumerate a list of angles to rotate through

* Adjust rotation matrix translation coords to avoid cropping

* Merged rotation-angle and rotation-angle-list options into rotate_images option

* Backwards compatibility

* Updated check whether to run image rotator

* Switched rotation convention to use positive angle = clockwise rotation, for backwards compatibility 
scripts/convert.py