💡(Feature Request) Match Output Aspect without rescaling!

Comments

jetdv wrote on 12/6/2023, 3:39 PM

@m3lquixd The main difference between the last one and the ca869579 version is the check for "smaller" in the last version. I suppose you could try the same fix of putting the if statement:

                                if (dFullWidth > dWidth || dFullHeight > dHeight)
                                {
                                    float pwid = 0.0F;
                                    ........
                                    ScaleKeyframe(thisKeyframe, pwid, 0);
                                }

around that section the same as it is in the newest version. I'm not planning to go back and revisit that version, though. This newest version does work great now at returning to full width or full height and not doing so multiple times whereas the "Match Output Aspect" option in Pan/Crop always fills the screen.

Looking a little deeper, inside the ........ section you will see (in the new one):

                                        pwid = dHeight / dFullHeight * 100;

If you change that to the following it will resize back to "original" size instead (like the other one):

                                        pwid = dHeight / scrHeight * 100;

That's really the only difference. Comparing to the full height of the Pan/Crop window vs comparing to the screen height. In a quick test, that one change new the NEW version gives the same functionality as the ca869579 version without multiple changes. So just change "dFullHeight" in the newest one on that one line to "scrHeight" and you should be good to go.


To make it a littler clearer what to change in the newest version to get the ca869579 resizing versus the full width or height:

                                    if (dFullHeight > scrHeight)
                                    {
                                        pwid = dFullHeight / dHeight * 100;
                                    }
                                    else
                                    {
                                        pwid = dHeight / dFullHeight * 100; //Pick for full width or height
                                        pwid = dHeight / scrHeight * 100; //Pick for resize to original size

                                        smaller = true;
                                    }

                                    if (dFullWidth > scrWidth)
                                    {
                                        smaller = false;
                                        wpwid = dFullWidth / dWidth * 100;
                                    }
                                    else
                                    {
                                        wpwid = dWidth / dFullWidth * 100;
                                    }