Opened 6 months ago
Closed 6 months ago
#22779 closed defect (bug) (fixed)
Image dimensions rounding
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | high | Milestone: | 3.5 |
| Component: | Media | Version: | 3.5 |
| Severity: | critical | Keywords: | has-patch |
| Cc: |
Description
Somehow the image editor is saving floats for dimensions, rather than rounding them according to the actual pixel dimensions of the image. These questions need to be answered before release:
- Is this a regression from 3.4.2? Maybe having to do with the image editors?
- If not a regression from 3.4.2, are we simply displaying it now without rounding them? I saw this in the attachment meta box, but does it exist in the media modal?
Attachments (3)
Change History (11)
koopersmith — 6 months ago
comment:1
koopersmith — 6 months ago
I can confirm that it is a regression.
Also, it's not just in the modal. It also happens in the non-modal image editor.
in [22094] we changed stream_preview_image() and wp_save_image() to no longer use imagesx and imagesy which return int and now use WP_Image_Editor and it's get_size method.
DH-Shredder in IRC:
This is the minimum (well, with additional sanity for update_size), and would restore us to what 3.4 did. We can do more casting or flooring, but I posted this initially because, well. We're right at the end, and I'd prefer to keep these sorts of changes as simple as possible. In particular, since we weren't doing any more with it previously.
"we weren't doing any more with it previously." — All I care about right now. Great.

It shows up in the modal, as that's the data the image editor saves to the DB.