              frame_name = os.path.splitext(src_filename)[0]
              progress_queue.put(1)
  
              for face_idx, face in enumerate(self._frame_faces[frame_idx]):
                  output = "{}_{}{}".format(frame_name, str(face_idx), ".png")
                  aligned = AlignedFace(face.landmarks_xy,
                                        image=image,
                                        centering="head",
                                        size=512)  # TODO user selectable size
                  meta = dict(alignments=face.to_png_meta(),
 
</s> remove             landmark = aligned.landmarks[landmark_index]  # pylint:disable=unsubscriptable-object
 </s> add             landmark = aligned.landmarks[landmark_index] </s> remove             key = "{}_{:06d}.png".format(basename, idx + 1)
 </s> add             key = f"{basename}_{idx + 1:06d}.png" </s> remove             logger.trace("Loading aligned face: (size: %s, dtype: %s)", size, dtype)
            self.aligned = AlignedFace(self.landmarks_xy,
                                       image=image,
                                       centering=centering,
                                       size=size,
                                       coverage_ratio=1.0,
                                       dtype=dtype,
                                       is_aligned=False)
 </s> add             logger.trace("Loading aligned face: (size: %s, dtype: %s)",  # type: ignore
                         size, dtype)
            self._aligned = AlignedFace(self.landmarks_xy,
                                        image=image,
                                        centering=centering,
                                        size=size,
                                        coverage_ratio=coverage_ratio,
                                        dtype=dtype,
                                        is_aligned=is_aligned,
                                        is_legacy=is_aligned and is_legacy) </s> remove     orig_filename = "{}_{}.png".format(os.path.splitext(src_fname)[0], face_idx)
    meta = dict(alignments=detected_face.to_png_meta(),
                source=dict(alignments_version=alignments.version,
 </s> add     orig_filename = f"{os.path.splitext(src_fname)[0]}_{face_idx}.png"
    meta = PNGHeaderDict(alignments=detected_face.to_png_meta(),
                         source=PNGHeaderSourceDict(
                            alignments_version=alignments.version, </s> remove             size = ((roi[1][0] - roi[0][0]) ** 2 +  # pylint:disable=unsubscriptable-object
                    (roi[1][1] - roi[0][1]) ** 2) ** 0.5  # pylint:disable=unsubscriptable-object
 </s> add             size = ((roi[1][0] - roi[0][0]) ** 2 + (roi[1][1] - roi[0][1]) ** 2) ** 0.5
                output = f"{frame_name}_{face_idx}.png"
              frame_name = os.path.splitext(src_filename)[0]
              progress_queue.put(1)
  
              for face_idx, face in enumerate(self._frame_faces[frame_idx]):
                output = f"{frame_name}_{face_idx}.png"
                  aligned = AlignedFace(face.landmarks_xy,
                                        image=image,
                                        centering="head",
                                        size=512)  # TODO user selectable size
                  meta = dict(alignments=face.to_png_meta(),
keep keep keep keep replace keep keep keep keep keep
 lib.align updates:
  - alignments.py
    - Add typed dicts for imported alignments
    - Explicitly check for presence of thumb value in alignments dict
    - linting
  - detected_face.py
    - Typing
    - Linting
    - Legacy support for pre-aligned face
    - Update dependencies to new property names 
tools/manual/detected_faces.py