Image resize not correctly honoring aspect ratio and staff space unit settings

• Dec 13, 2018 - 20:00
Reported version
3.0
Priority
P1 - High
Type
Functional
Frequency
Many
Severity
S3 - Major
Reproducibility
Always
Status
active
Regression
No
Workaround
No
Project

When resizing images, the button "maintain aspect ratio" has no effect when you enter new sizes in the inspector menu. When you resize the image draging with the mouse, aspect ratio is maintained.

When file with the resized image is saved and reopenend , image size is back to the original value.

Happens with this nighly as well as with the latest 3.0 Beta


Comments

Status active needs info

I didn't have any trouble resizing images with or without the aspect ratio option, and my changes were saved. Can you attach your score and precise steps to reproduce the problem?

Here are the detailed steps and results. Scores and screen snippets attached
- Load score "Bajazzo wo img.mscz"
- Click on title frame, right-click -> add -> picture: selects file "Männerchor Logo.JPG"
- Inspector looks like this: "Inspector1.JPG"
- Changing the value for width in the inspector menu does not change the height to maintain the aspect ratio
(Musescore 2 does this automatically)
- Dragging the corner of the image with the mouse does change both dimensions width and height correctly when the "Lock aspect ratio" button is set.
This was the resize issue - now for the save and reload.
- Change the image size with mouse
- New size see inspector clip "Inspector2.JPG"
- Save file as "Bajazzo with img.mscz"
- Close musescore, start new, reload file "Bajazzo with img.mscz"
- Image size see "Inspector3.JPG"
- Image size is neither the one when the image was first imported nor the one when the file with the resized image was saved.

Attachment Size
Bajazzo wo img.mscz 90.73 KB
Männerchor_Logo.JPG 63.16 KB
Inspector1.JPG 31.52 KB
Inspector2.JPG 30.52 KB
Bajazzo with img.mscz 91.03 KB
Inspector3.JPG 32.55 KB
Priority P2 - Medium

OK, I see, "Lock aspect ratio" works fine for dragging but it doesn't apply to adjustments made in the Inspector.

The save/reload issue I cannot reproduce with a current build, however. I followed your steps and on reload got exactly what I expected. Can you try again with today's beta update?

As an IT-consultant of more than 30 years I knew we must be doing something different if we get different results.
I finally found the small difference. I get the correct behavior when I leave the check in the box "Size in staff space units". The image size remains unchanged if I save and reload the score. When I remove the checkmark and do save and reload the image size has changed. The factor between the size before and after reloading the file is exactly the value for scaling in the page settings "Staff space". I could reproduce this when I change the scaling in the page settings. The factor before/after equals the new value for "Staff space". I think this information could give the developer some hints where to look for the origin of this behavior. During my test Musescore crashed once when I removed the check "Size in staff space units" - but this could not be reproduced.

Title Resizing Images Image resize not correctly honoring aspect ratio and staff space unit settings
Priority P2 - Medium P1 - High
Status needs info active

Thanks, that explains things and should help in fixing the issue.

Any chance this can be fixed in 3.3? Not being able to resize inserted images without distorting them is a major pain with no work-around, as far as I know.

For me, editing the image directly - double-click and drag handles - works fine. So does placing the image in a frame and using the "scale to frame size" button. So that's a couple of workarounds, no?

Meanwhile, though, should be a pretty easy fix I would have to imagine, although image processing isn't my forte.