Skip to content

Lock ratio button unexpectedly crops the canvas #771

Closed

Description

@Domarius

Synfig version & platform:
SynfigStudio-1.3.11-testing-19.02.09-linux64-9583a.appimage

Issue description:
As discussed here, when rendering a project, clicking the "link" button (highlighted in the image below) causes the undesired behaviour of cropping the canvas to the new render size, eg. if the new size is smaller than the canvas size.

Whereas if you don't click this button, and enter a new size (eg. smaller than the canvas), the project will be scaled down to render at the new size.

ratio lock
Steps to reproduce:

Normal behaviour;

  • Set canvas property to 1920x1080
  • Insert some image/photo where cropping will be obvious (eg. a photo portrait), scale it to full size of the canvas.
  • File, Render, type 1280x720 for the canvas width & height but do NOT click the link button
  • Render (you can just render 1 image)
  • Note that the full canvas is in the rendered image, it's just at a smaller resolution

Incorrect behaviour;

  • File, Render
  • Click the link button so that the 2 rings show as linked together
  • Enter "1280" for the width, then click or tab away from the field to have the height automatically change to 720
  • Render
  • Note that the canvas has now been cropped to the smaller size, instead of scaled.

You can reset this incorrect behaviour by clicking the link button again so that the rings are now unlinked.

Activity

  1. BobSynfig commented on Mar 14, 2019

    @BobSynfig
    Collaborator

    Hi,
    Did you check the options in the tab "Other"?
    There are options having consequences on this first tab.
    Also please have a look at the wiki pages:
    https://wiki.synfig.org/Canvas_Properties_Dialog
    https://wiki.synfig.org/Image_Dimensions

    A french user had a similar problem of understanding about these options and it has be explained and solved here https://forums.synfig.org/t/agrandir-image-pas-juste-le-calque/9579

  2. Domarius commented on Mar 15, 2019

    @Domarius
    Author

    Thanks for getting back to me. I think we aren't talking about the same problem. I tried those options on the other tab, and it has no effect. The pages you linked too still don't explain this behaviour. And the French user isn't talking about this specific problem.

    Why would the "lock ratio" link button suddenly switch the output to cropped? This button should only keep the width & height in ratio with each other or not. It shouldn't affect cropping vs scaling. For that there should be a separate explicit option that says "Crop to new size" or "Scale to new size".

    I've created a video demonstrating the problem here, hope this helps;
    https://youtu.be/6hToWHRioVI

  3. BobSynfig commented on Mar 15, 2019

    @BobSynfig
    Collaborator

    Ok, I see what is your problem
    Try the following

    • Original 1920x1080
    • F8 (for modification of the canvas) or F9 (for render only)
    • In "Other", check "Image Aspect" and "Image Span"; other checkboxes are uncheked
    • In "Image", link "Image Size" and change "Width" to 1280, "Height" will be changed automatically to 720
    • Validate

    You can render it, it works for both Canvas and Render ;)

  4. ebarranco commented on Mar 15, 2019

    @ebarranco

    Yeah that works. @BobSynfig Maybe it should be check automatically or by default when you link your image size? Because it's the common case. And only you should change the Other properties if you want to resize the canvas without the content.

  5. morevnaproject commented on Mar 15, 2019

    @morevnaproject
    Member

    I agree with @ebarranco

  6. Domarius commented on Mar 16, 2019

    @Domarius
    Author
  7. morevnaproject commented on Mar 17, 2019

    @morevnaproject
    Member

    So are there any young brave, who can make "Image Aspect" checkbox enabled by default? ^__^

  8. ankit-kumar-dwivedi commented on Mar 25, 2019

    @ankit-kumar-dwivedi
    Member

    So are there any young brave, who can make "Image Aspect" checkbox enabled by default? ^__^

    May I do this Sir! @morevnaproject (^_^)

  9. morevnaproject commented on Mar 26, 2019

    @morevnaproject
    Member

    @ankit-kumar-dwivedi Awesome! This issue is yours now. ^__^

  10. added
    Assigned
    on Mar 26, 2019
  11. ankit-kumar-dwivedi commented on Mar 28, 2019

    @ankit-kumar-dwivedi
    Member

    @morevnaproject should I do this for render settings too?

  12. morevnaproject commented on Mar 28, 2019

    @morevnaproject
    Member

    @ankit-kumar-dwivedi Yes, please! ^__^

  13. 2 remaining items

  14. morevnaproject commented on Mar 31, 2019

    @morevnaproject
    Member

    So, thanks to @ankit-kumar-dwivedi, "Image Aspect" and "Image Span" checkboxes are checked by default now.

    And that made things work correctly when you have image width and height linked.

    BUT, that introduces another issue: if you have width and height NOT linked, then changing one of them distorts the image.

    Let's check the sample scene 480x270:
    screenshot_002

    Make sure width and height NOT linked, change width to 1920. Apply changes. Result:
    screenshot_003

    We've got canvas stretched, not expanded.

    Let me mention, that this could be good and expected behavior for case when we specify parameters for final rendering. I.e., we have composition 1920x1080 and render it to 1920x540 -> get stretched result -> OK.

    But when we change composition properties for editing (via Canvas -> Properties), this is NOT "good and expected behavior".

    Actually, what we come to is already has been mentioned in this post long time ago - http://www.segtsy.com/2013/12/a-significant-synfig-setback/ - image dimensions in "File - Render" serve different purpose than image dimensions in "Canvas - Properties".

  15. added this to the v1.4.0 milestone on Mar 31, 2019
  16. Domarius commented on Apr 1, 2019

    @Domarius
    Author

    Actually I think that article is talking about a different issue yet again, sadly...

    Quotes from the above article, 5 years ago...

    "In all other software programs the render size and project size are in two exclusively different parts of the program. Never have I seen the final render size affect the actual document/canvas size. It’s so weird."

    In any case, this quote rings true for both issues;

    "Setting up your file should be basic and easy to understand. It shouldn’t be hidden in cryptic units or wonky settings that change on a dime as you type them in. This is the front door of the software. If a user is turned off by the front door, we’ll most likely never get them to come inside and hang out."

    The article contains screenshots from every other mainstream program showing how canvas size properties should be laid out.

    sigh all I know is when using Synfig, just never touch that "lock ratio" button! I'm just going to continue working around it... it isn't any wonder when I asked about it on the forums, people said it was broken and not to touch it!

  17. BobSynfig commented on Apr 1, 2019

    @BobSynfig
    Collaborator

    Synfig's system is not so ergonomic but it works as expected once understood...
    Like for the "Lock Ratio" once the options set properly before.
    Beware of regressions!
    Regressions

  18. Domarius commented on Apr 2, 2019

    @Domarius
    Author

    Yes normally we find minor inconveniences managable for free software, and it's to be expected. But actually I found Synfig to be pretty intuitive in most other ways! Well when I found I couldn't move things as I expected, a bit of googling showed me I had to group everything first. And that pictures import as 2 nested objects. But once I knew this it became evident there was a benefit to this, and I realised it was more flexible than flash, and am perfectly happy with these concepts!

    This canvas thing isn' the hugest issue to be honest, because I can just avoid clicking the button. But this is a disproportionately weird one compared to Synfigs other idiosyncrasies, as it seems to throw people right off and think that something is a bug! And no immediate advantage that I can see...

    Anyway if we have to give this a priority, I would say even though the chance of someone being confused by it is pretty much 100%, the chance of someone running into it as a problem is lower than that, and since I can work around it by never clicking that lock button, the impact is negligible in the end.

    But if it causes lots of redundant messages / bug reports of people asking what the problem is, maybe then it's worth addressing :) Looks like I was one of the first to bring it up in a long time. The replies I got was that the button is "broken" so perhaps people are just quietly avoiding it and getting on with their work.

    For now I'm just happy the issue has been raised. The only reason I'm so invested in discussing an issue like this is because I'm really liking Synfig ;)

  19. morevnaproject commented on Apr 3, 2019

    @morevnaproject
    Member

    Let's keep going with the issue. ^__^

    Here is an interesting thing to mention.

    I have a default document with default parameters:

    screenshot_003

    My "locks and links" parameters are set as before the change made by #797:

    screenshot_004

    Now, here is what I have if I change width and height manually, without the "chain" button disabled:

    screenshot_005

    IMPORTANT: Notice the "Image span" value remains the same as in first screenshot.

    But if I do the same operation with the "chain" button enabled, then I get the following:

    screenshot_006

    IMPORTANT: Notice the "Image span" value changed!

    So, I think the problem is with the "chain" button - for some reason it does something wrong.

  20. morevnaproject commented on Apr 3, 2019

    @morevnaproject
    Member

    Quick investigation leads me to this function -

    void
    Widget_RendDesc::on_ratio_res_toggled()
    {
    if(update_lock)return;
    UpdateLock lock(update_lock);
    if(toggle_res_ratio->get_active())
    {
    rend_desc_.set_res_ratio(adjustment_xres->get_value(), adjustment_yres->get_value());
    rend_desc_.set_flags(rend_desc_.get_flags()|RendDesc::LINK_RES);
    }
    else
    {
    rend_desc_.set_flags(rend_desc_.get_flags()&~RendDesc::LINK_RES);
    }
    }

  21. added a commit that references this issue on Apr 3, 2019
    6eafe8e
  22. removed
    Assigned
    on Apr 3, 2019
  23. morevnaproject commented on Apr 3, 2019

    @morevnaproject
    Member

    Issue is fixed now via 6eafe8e.

    Still I encourage to continue discussion raised by article - http://www.segtsy.com/2013/12/a-significant-synfig-setback/

    Your suggestions for improvements of handling canvas size are welcome here - #777

    ^__^

  24. Domarius commented on Apr 5, 2019

    @Domarius
    Author

    Oh so the chain button was actively doing something wrong, like it seemed all along?!

    (I must admit I never bothered to look into the explanation for how to "properly" use it, since it just seemed better not to touch it in the first place.)

  25. morevnaproject commented on Apr 7, 2019

    @morevnaproject
    Member

    Oh so the chain button was actively doing something wrong, like it seemed all along?!

    Exactly. ^_^

  26. Domarius commented on Feb 8, 2020

    @Domarius
    Author

    This is great to see! Thanks Konstantin :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions