Making WordPress.org

Opened 6 months ago

Closed 6 months ago

Last modified 6 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
Cc:

Description

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

Example: https://wordpress.org/photos/photo/98665b56c9/

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 6 months ago.
Screenshot of a long focal length value.

Download all attachments as: .zip

Change History (4)

@roytanck
6 months ago

Screenshot of a long focal length value.

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


6 months ago
#1

  • Keywords has-patch added

#2 @coffee2code
6 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.
Fixes https://github.com/WordPress/wordpress.org/pull/196

#3 @dd32
6 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.