Opened 3 months ago

Closed 3 months ago

Last modified 3 months ago

#7427 closed defect (bug) (fixed)

Round the focal length value from EXIF when displayed

Reported by: roytanck's profile roytanck Owned by: coffee2code's profile coffee2code
Milestone: Priority: normal
Component: Photo Directory Keywords: has-patch


It appears that the EXIF data focal length value is displayed as is. Sometimes this value is very precise, something like "5.6999998092651mm".


Can we perhaps round this number to two decimals? I feel that would still be accurate enough, and look much better.

Attachments (1)

Scherm­afbeelding 2024-01-29 om 14.47.20.png (136.9 KB) - added by roytanck 3 months ago.
Screenshot of a long focal length value.

Download all attachments as: .zip

Change History (4)

3 months ago

Screenshot of a long focal length value.

This ticket was mentioned in PR #196 on WordPress/ by @benniledl.

3 months ago

  • Keywords has-patch added

#2 @coffee2code
3 months ago

  • Owner set to coffee2code
  • Resolution set to fixed
  • Status changed from new to closed

In 13155:

Photo Directory, Photo: Round focal length value to at most two decimal places if greater precision is provided.

Props benniledl, roytanck, coffee2code.
Fixes #7427.

#3 @dd32
3 months ago

In 13156:

Photo Directory, Photo: Use break instead of continue within switch.

Avoids a PHP warning: E_WARNING: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

Introduced in [13155].
See #7427.

Note: See TracTickets for help on using tickets.