-
-
Notifications
You must be signed in to change notification settings - Fork 289
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
Halve framerate and dimension if they are big #31
Conversation
Maybe its better if we instead of halving, used 24 fps and 640 width as standard if the video is bigger..? |
I'd suggest halve first, then cap. Halving (or dividing by integer in general) gives the best quality -- smoothest animation and nicest scaling. GIF can only express framerates as 100/n, and most screens can play only 60/n, so 10 and 20fps are the best framerates for GIF. Uneven framerate scaling causes judder: https://en.wikipedia.org/wiki/Three-two_pull_down |
@LarsJK Are you still interested in finishing this? No worries if you don't have time right now. |
@sindresorhus Yeah I can finish this. I tried implementing a ticked slider but it it didn't look very good. Too many ticks and probably need to do something about the styling to make it work better with the dark background. |
My idea is that we use a normal slider, but have a list of predefined sizes, like commented in #25 (comment). So let's say if we had 4 predefined sizes, when the slider is at 0%, it would pick the first, when it's at 20% it would still pick the first, when at 26% it would pick the second, and when at 76% it would pick the last element. So we just spread the elements evenly out. So it's like a tick slider without the ticks. |
I also think we should revert the open/save dialog to be non-dark. It looked cool at first, but it's clearly not designed to be dark and there are a lot of weird visual bugs. |
We could also maybe make the text on the right-side of the slider a text field instead, for the perfectionists that want an exact size more easily. |
@sindresorhus 🤞Real dark mode support announce next week |
We got it!!!!!!! |
Done in 2894888 |
@sindresorhus I simplified the code a bit, and changed the minimum scale so that it will allow you to scale the GIF down to 10x10 independent of the input size.. I'm struggling to find a good way to use predefined size and a slider. Do you prefer a slider or could we do a dropdown like preview: The preset that give the best quality (1/n scaling) can be marked with "best quality" or something like that.. Maybe we should merge this to get better defaults and figure out the way to handle predefines in another PR? |
👍 Can you open an issue about the remaining things we need to change? Like slider=>dropdown. |
This looks great :) |
We already clamp the framerate to 5-30. Do wee need to also halve it? If so should the halving be based on the clamped value, or the original value then clamped to 5-30..?
closes #28