Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock ratio button unexpectedly crops the canvas #771

Closed
Domarius opened this issue Mar 14, 2019 · 22 comments
Closed

Lock ratio button unexpectedly crops the canvas #771

Domarius opened this issue Mar 14, 2019 · 22 comments

Comments

@Domarius
Copy link

@Domarius Domarius commented Mar 14, 2019

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.

@BobSynfig

This comment has been minimized.

Copy link
Collaborator

@BobSynfig BobSynfig commented Mar 14, 2019

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

@Domarius

This comment has been minimized.

Copy link
Author

@Domarius Domarius commented Mar 15, 2019

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

@BobSynfig

This comment has been minimized.

Copy link
Collaborator

@BobSynfig BobSynfig commented Mar 15, 2019

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 ;)

@ebarranco

This comment has been minimized.

Copy link

@ebarranco ebarranco commented Mar 15, 2019

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.

@morevnaproject

This comment has been minimized.

Copy link
Member

@morevnaproject morevnaproject commented Mar 15, 2019

I agree with @ebarranco

@Domarius

This comment has been minimized.

Copy link
Author

@Domarius Domarius commented Mar 16, 2019

@morevnaproject

This comment has been minimized.

Copy link
Member

@morevnaproject morevnaproject commented Mar 17, 2019

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

@ankit-kumar-dwivedi

This comment has been minimized.

Copy link
Member

@ankit-kumar-dwivedi ankit-kumar-dwivedi commented Mar 25, 2019

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

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

@morevnaproject

This comment has been minimized.

Copy link
Member

@morevnaproject morevnaproject commented Mar 26, 2019

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

@ankit-kumar-dwivedi

This comment has been minimized.

Copy link
Member

@ankit-kumar-dwivedi ankit-kumar-dwivedi commented Mar 28, 2019

@morevnaproject should I do this for render settings too?

@morevnaproject

This comment has been minimized.

Copy link
Member

@morevnaproject morevnaproject commented Mar 28, 2019

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

@morevnaproject

This comment has been minimized.

Copy link
Member

@morevnaproject morevnaproject commented Mar 31, 2019

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".

@morevnaproject morevnaproject added this to the v1.4.0 milestone Mar 31, 2019
@Domarius

This comment has been minimized.

Copy link
Author

@Domarius Domarius commented Apr 1, 2019

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!

@BobSynfig

This comment has been minimized.

Copy link
Collaborator

@BobSynfig BobSynfig commented Apr 1, 2019

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

@Domarius

This comment has been minimized.

Copy link
Author

@Domarius Domarius commented Apr 2, 2019

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 ;)

@morevnaproject

This comment has been minimized.

Copy link
Member

@morevnaproject morevnaproject commented Apr 3, 2019

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.

@morevnaproject

This comment has been minimized.

Copy link
Member

@morevnaproject morevnaproject commented Apr 3, 2019

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);
}
}

morevnaproject added a commit to morevnaproject/synfig that referenced this issue Apr 3, 2019
@morevnaproject morevnaproject removed the Assigned label Apr 3, 2019
@morevnaproject

This comment has been minimized.

Copy link
Member

@morevnaproject morevnaproject commented Apr 3, 2019

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

^__^

@morevnaproject morevnaproject added this to Done in Releases Apr 3, 2019
@Domarius

This comment has been minimized.

Copy link
Author

@Domarius Domarius commented Apr 5, 2019

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.)

@morevnaproject

This comment has been minimized.

Copy link
Member

@morevnaproject morevnaproject commented Apr 7, 2019

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

Exactly. ^_^

@morevnaproject morevnaproject moved this from Done to Released in Releases Feb 6, 2020
@morevnaproject

This comment has been minimized.

Copy link
Member

@morevnaproject morevnaproject commented Feb 7, 2020

@Domarius

This comment has been minimized.

Copy link
Author

@Domarius Domarius commented Feb 8, 2020

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
Projects
Releases
Released
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.