Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change name of images recorded by the Camera Block #104

Merged
merged 1 commit into from
Feb 25, 2024

Conversation

WeisLeDocto
Copy link
Member

As reported in #98, the name of the images saved by the Camera Block (via the ImageSaver CameraProcess) is currently in the format f'{index}_{time:.3f}.{ext}'. Example image names: 1_0.100, 2_0.200, 21_2.100, etc. This poses problems for navigating in file explorers, or for compatibility with third -party processing software, as the first character in the name is used for sorting.

This PR changes the name of the recorded images to f'{index:06d}_{time:.3f}.{ext}', therefore adding a zero-padding as a prefix to the index to get at least 6 digits. The example names become 000001_0.100, 000002_0.200, 000021_2.100, etc. This PR fixes the sorting issue with file explorers and third-party software when less than 1 millions images are acquired. It preserves compatibility with the FileReader Camera without requiring changes in this file.

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.
@WeisLeDocto WeisLeDocto self-assigned this Feb 25, 2024
@WeisLeDocto WeisLeDocto merged commit 980f445 into develop Feb 25, 2024
19 checks passed
@WeisLeDocto WeisLeDocto deleted the feature/saved_images_names branch February 25, 2024 22:33
This was referenced Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant