          faces = self.get_faces(image)
          process_faces = [(idx, face) for idx, face in faces]
  
          # Run image rotator if requested and no faces found
          if self.arguments.rotate_images.lower() == 'on' and len(process_faces) == 0:
              process_faces, image = self.imageRotator(image)
  
          rvals = []
          for idx, face in process_faces:
              # Draws landmarks for debug
 
</s> remove             angle += 90
 </s> add  </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: </s> remove                         image = rotate_image(image, face.r * -1)
 </s> add                         image = rotate_image(image, face.r * -1, rotated_width=width, rotated_height=height)
        if self.rotation_angles is not None and len(process_faces) == 0:
          faces = self.get_faces(image)
          process_faces = [(idx, face) for idx, face in faces]
  
          # Run image rotator if requested and no faces found
        if self.rotation_angles is not None and len(process_faces) == 0:
              process_faces, image = self.imageRotator(image)
  
          rvals = []
          for idx, face in process_faces:
              # Draws landmarks for debug
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/extract.py