Make WordPress Core

Opened 9 years ago

Last modified 7 weeks ago

#32282 accepted defect (bug)

WordPress image cropping is buggy

Reported by: jossnaz's profile Jossnaz Owned by: joedolson's profile joedolson
Milestone: 6.6 Priority: normal
Severity: normal Version: 4.2.2
Component: Media Keywords: has-patch needs-refresh
Focuses: administration Cc:

Description

see here

http://wordpress.stackexchange.com/questions/187577/cropping-image-results-in-image-being-too-small?noredirect=1#comment273421_187577

text copied from there:

This is the wordpress version 4.2.2 powell

I crop 1500 x 1000 and then press on crop, then save.

Resulting image size:

1497 x 1000

I don't know, I somehow hoped that wordpress is able to crop correctly.

The original image can be found here:

http://img.youtube.com/vi/zXgyoDAuaH0/maxresdefault.jpg

What I did is downsize to .... x 1000 then try to crop with selection manually entering 1500 x 1000

You can actually see the bug earlier, when you enter 1500 x 1000 and then click on the selection to drag it around (right, drag the selection, not change size) it results in the number 1500 falling down to 1498.

Attachments (1)

32282.diff (7.2 KB) - added by johnillo 3 years ago.

Download all attachments as: .zip

Change History (12)

#1 @rachelbaker
8 years ago

  • Focuses administration added
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

I successfully reproduced this bug using the latest trunk from 4.5 and the provided image. After manually setting a crop size of 1500x1000 the image size then changed to 1497x998 once I pressed the crop button, or tried to move the selection area.

https://cldup.com/-tX2uK8Tcp.png

#3 @desrosj
7 years ago

  • Summary changed from Wordpress image cropping is buggy to WordPress image cropping is buggy

@johnillo
3 years ago

#4 @Presskopp
3 years ago

  • Keywords has-patch added; needs-patch removed

#5 @johnillo
3 years ago

  • Crop the image in 100% scale to avoid rounding errors.
  • Don't recompute selection values when selection is dragged only.
  • Fix the issue where the selection values are off after the image is scaled down or restored.
  • Keep aspect ratio when holding the shift key.
Last edited 3 years ago by johnillo (previous) (diff)

#6 @joedolson
6 months ago

  • Milestone changed from Future Release to 6.5

Confirmed still an issue.

#7 @joedolson
6 months ago

  • Owner set to joedolson
  • Status changed from new to accepted

This ticket was mentioned in Slack in #core by rajinsharwar. View the logs.


3 months ago

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


2 months ago

#10 @joedolson
2 months ago

  • Keywords needs-refresh added

#11 @swissspidy
7 weeks ago

  • Milestone changed from 6.5 to 6.6

Punting due to lack of activity & new patch.

Note: See TracTickets for help on using tickets.