#11473 closed defect (bug) (fixed)
error on resize picture in media
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 2.9 | Priority: | normal |
| Severity: | normal | Version: | 2.9 |
| Component: | Editor | Keywords: | |
| Focuses: | Cc: |
Description
When I try to resize (scale) image in media library, It return error message: Error while saving the scaled image. Please reload the page and try again.
Problem is only with some pictures with "bad" resolution and it doesnt fit this condition correctly (different is about 0.01 - 0.03):
check if it has roughly the same w / h ratio
if ( round($sX / $sY, 1) == round($fwidth / $fheight, 1) )
Change History (4)
#2
@
16 years ago
Can't reproduce this. What is the image resolution you're trying? This is mostly a sanity check. Would changing it to something like this work:
$diff = round($sX / $sY, 2) - round($fwidth / $fheight, 2); if ( -0.05 < $diff && $diff < 0.05 ) ...
Note: See
TracTickets for help on using
tickets.
Sorry, I copy bad "fix" code, in original code is round(..., 2)