Skip to content

Commit

Permalink
feat: change name of images recorded by the Camera Block
Browse files Browse the repository at this point in the history
The index of the recorded images is now padded with zeros to be at least 6 figures long.
Improves the sorting in file explorers, and compatibility with image-processing software.
Unlikely to be a breaking change.
  • Loading branch information
WeisLeDocto committed Feb 25, 2024
1 parent be9ce7a commit 4071b0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/crappy/blocks/camera_processes/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,11 @@ def loop(self) -> None:

# Only include the extension for the image file if applicable
if self._img_extension:
path = str(self._save_folder / f"{self.metadata['ImageUniqueID']}_"
path = str(self._save_folder / f"{self.metadata['ImageUniqueID']:06d}_"
f"{self.metadata['t(s)']:.3f}."
f"{self._img_extension}")
else:
path = str(self._save_folder / f"{self.metadata['ImageUniqueID']}_"
path = str(self._save_folder / f"{self.metadata['ImageUniqueID']:06d}_"
f"{self.metadata['t(s)']:.3f}")

# Saving the image at the destination path using the chosen backend
Expand Down

0 comments on commit 4071b0b

Please sign in to comment.