photos
photos copied to clipboard
Viewer does not play animated GIFs
What it says above. Open an animated GIF, it does not animate.
Launchpad Details: #LP1675883 Sam Hewitt - 2017-03-24 18:10:55 +0000
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Will Photos App in Juno stable release support animated gifs?
Since Videos can't play .gif files either (maybe because gif files are image files), I ask whether someone is interested in this matter and can imagine working on an implementation of .gif support in Photos.
I guess this is because the scaled_read
method in the GifReader class takes Gdk.PixBuf
as a return that does only support static images:
https://github.com/elementary/photos/blob/3340506cda5082627cb60b251a4186f4d989e6a2/src/photos/GifSupport.vala#L126
Gdk.PixBufAnimation
seems to support both static and animated images, but I suppose fixing this issue may require hard work because this is an overridden method and Gtk.PixBuf
is used elesewhere in the source code.
Thanks for looking into the code! I am also surprised that there is a GifSupport.vala but no animated Gifs.
Wouldn't it be possible that only the scaled_read
method in the GifReader uses Gdk.PixBufAnimation
instead of Gtk.PixBuf
? Or what would be the disadvantage of switching completely to Gdk.PixBufAnimation
? What are the advantages of using Gtk.PixBuf
exclusively so far?
Wouldn't it be possible that only the
scaled_read
method in the GifReader usesGdk.PixBufAnimation
instead ofGtk.PixBuf
?
It's not possible because the scaled_read
method is an overridden method of scaled_read
method in GdkReader class. Overridden methods need to have the same name, arguments, and return. So if we want to change the return type of scaled_read
method in the GifReader, we also need to change the return type of scaled_read
method in the GdkReader class and all classes that inherit this class.
Gdk.PixBufAnimation
and Gtk.PixBuf
seem to be completely different classes and they don&t have the same base class. However, both can be created a new instance with GLib.InputStream
, so this might help us.
I tried installing Eye of GNOME and it seem to support animated GIF using Gdk.PixBufAnimation
. I'll check how it handle this problem.
Please don't let this issue die..