Skip to content

support NEF/ARW/DNG raw formats and zero-padded image IDs#130

Open
ManuelOsburg wants to merge 1 commit into
FireDynamics:masterfrom
ManuelOsburg:feature/raw-format-windows-compat
Open

support NEF/ARW/DNG raw formats and zero-padded image IDs#130
ManuelOsburg wants to merge 1 commit into
FireDynamics:masterfrom
ManuelOsburg:feature/raw-format-windows-compat

Conversation

@ManuelOsburg

Copy link
Copy Markdown

Adopted and reworked from the annatroff/LEDSAwindows fork:

  • extend the raw format whitelist in image_reading by .NEF, .ARW and .DNG (rawpy reads them already; EXIF works with the existing exiv2 binding) and raise a clear ValueError for unsupported extensions instead of failing with UnboundLocalError
  • fix a path bug in ConfigData.get_start_time where directory and file name were concatenated without a separator inside os.path.join
  • add image_handling.format_img_name and use it wherever image names are built from the config template: plain {} placeholders now keep zero-padded IDs such as '0001' (DSC_0001.NEF), while numeric format specs like {:04d} still receive an integer

The int() casts previously applied before formatting broke camera series with zero-padded file counters. Unit tests cover the extension routing and both formatting paths.

Adopted and reworked from the annatroff/LEDSAwindows fork:

- extend the raw format whitelist in image_reading by .NEF, .ARW and
  .DNG (rawpy reads them already; EXIF works with the existing exiv2
  binding) and raise a clear ValueError for unsupported extensions
  instead of failing with UnboundLocalError
- fix a path bug in ConfigData.get_start_time where directory and file
  name were concatenated without a separator inside os.path.join
- add image_handling.format_img_name and use it wherever image names
  are built from the config template: plain {} placeholders now keep
  zero-padded IDs such as '0001' (DSC_0001.NEF), while numeric format
  specs like {:04d} still receive an integer

The int() casts previously applied before formatting broke camera
series with zero-padded file counters. Unit tests cover the extension
routing and both formatting paths.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant