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

Add default delay when delay < 1 #3

Merged
merged 1 commit into from Nov 20, 2013

Conversation

Projects
None yet
2 participants
@guns
Copy link
Contributor

guns commented Jul 28, 2013

Hello,

I have been using gifview for a little while, and I really like it.
However, I initially passed it up because it animated some GIFs at high
speed.

I didn't discover the --min-delay option until today, but it isn't
adequate to cover the following use case:

There are two GIFs:

a.gif       delay: 0    (looks best at delay=8)
b.gif       delay: 4

If I use --min-delay 8 to view both a.gif and b.gif, the latter is too
slow, and if I use --min-delay 4 to view both, the former is too fast.

I'd like to use gifview from my file manager, so the .desktop entry for
gifview will contain static command line parameters.

I think it would help the "out of box" usability of gifview to set a
default delay (that can still be raised by min_delay) for GIFs that have
not specified a delay.

The value of 0.08 seconds corresponds to 12.5 FPS which seems to work
quite well empirically.

@guns

This comment has been minimized.

Copy link
Contributor Author

guns commented Jul 28, 2013

UPDATE:

I rebased and force pushed a better patch that lets min-delay take precedence over the default value in case the user wants to view delay=0 GIFs with a delay < 8.

@kohler

This comment has been minimized.

Copy link
Owner

kohler commented Jul 29, 2013

I might be willing to merge a --default-delay option, but it would default to "as fast as possible" (i.e. the current behavior).

@kohler

This comment has been minimized.

Copy link
Owner

kohler commented Jul 29, 2013

P.S. Thanks for the contribution!

Add --fallback-delay option for GIFs with delay == 0
The --min-delay option raises the delay floor, but also raises the delay
of gifs with purposefully low values.

The --fallback-delay option allows setting a default value for GIFs that
do not specify a delay value without raising the minimum delay for _all_
GIFs displayed.

The --min-delay option takes precedence over the fallback value.
@guns

This comment has been minimized.

Copy link
Contributor Author

guns commented Jul 29, 2013

I can see the value of having 0 as the default. I amended the commit and added the option as --fallback-delay, because the intent is clearer.

No pressure to merge; I just would like a way to use gifview as my default animated GIF viewer in static configuration files without having to specify a global minimum floor.

kohler added a commit that referenced this pull request Nov 20, 2013

Merge pull request #3 from guns/default-delay
Add default delay when delay < 1

@kohler kohler merged commit f4d5f74 into kohler:master Nov 20, 2013

@kohler

This comment has been minimized.

Copy link
Owner

kohler commented Nov 20, 2013

I spaced out on this but it's good and now it's committed! Thanks.

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