Bug 90262 - Some animated gif files do not loop infinitely when inserted in the presentation
Summary: Some animated gif files do not loop infinitely when inserted in the presentation
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Images-Animated
  Show dependency treegraph
 
Reported: 2015-03-26 15:24 UTC by FM
Modified: 2019-01-14 13:29 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
infinite loop gif (8.66 KB, image/gif)
2015-04-07 07:44 UTC, FM
Details

Note You need to log in before you can comment on or make changes to this bug.
Description FM 2015-03-26 15:24:47 UTC
Impress is able to import animated gif files (loop forever), but some of them only play once and then just stop. It seems that there are slightly different types of gif files and Impress only supports a certain one.

See related posts, it seems to be an old problem:
https://forum.openoffice.org/en/forum/viewtopic.php?f=10&t=510#p2163
https://root.cern.ch/phpBB3/viewtopic.php?f=3&t=19476

See here two looping gif files
https://root.cern.ch/phpBB3/download/file.php?id=10269
https://root.cern.ch/phpBB3/download/file.php?id=10268
the latter not being displayed correctly in Impress (it plays just once). A similar bug is found if you open these links in Firefox, but it plays correctly in Chrome.
Comment 1 Robinson Tryon (qubit) 2015-03-31 17:19:44 UTC
TESTING with 4.4.1.2 + Ubuntu 14.04

(In reply to FM from comment #0)
> Impress is able to import animated gif files (loop forever), but some of
> them only play once and then just stop.
> ...
> See here two looping gif files
> https://root.cern.ch/phpBB3/download/file.php?id=10269
> https://root.cern.ch/phpBB3/download/file.php?id=10268
> the latter not being displayed correctly in Impress (it plays just once). A
> similar bug is found if you open these links in Firefox, 

Both files loop for me in FF 36.0.4

> https://root.cern.ch/phpBB3/download/file.php?id=10269

This image loops in Impress.

> https://root.cern.ch/phpBB3/download/file.php?id=10268

This one does not loop in Impress.

So, bug CONFIRMED
Status -> NEW
Comment 2 Matthew Francis 2015-04-07 00:46:38 UTC
The infinitely looping image is set to "loop forever", the other one to "loop count 50"

So the issue is apparently that the loop count isn't properly parsed.

This is the case all the way back to LO 3.3.0, and also occurs on OSX
-> Version: Inherited from OOo
-> Platform: All


$ gifsicle -I test_gifs_gimp.gif 
* test_gifs_gimp.gif 4 images
  logical screen 696x472
  global color table [8]
  background 5
  loop forever
  + image #0 696x472
    comment Created with GIMP
    delay 0.50s
  + image #1 696x472 transparent 7
    delay 0.50s
  + image #2 696x472 transparent 7
    delay 0.50s
  + image #3 696x472 transparent 7
    delay 0.50s
$ gifsicle -I test_gifs.gif 
* test_gifs.gif 4 images
  logical screen 696x472
  global color table [8]
  background 0
  loop count 50
  + image #0 696x472
    delay 0.50s
  + image #1 696x472
    delay 0.50s
  + image #2 696x472
    delay 0.50s
  + image #3 696x472
    delay 0.50s
asbel@ramiel:~/Downloads$
Comment 3 FM 2015-04-07 07:44:25 UTC
Created attachment 114666 [details]
infinite loop gif
Comment 4 FM 2015-04-07 07:49:28 UTC
I attached another gif, which has an infinite loop instead of just 50 repetitions. The problem is the same, it loops in web browsers, but not in Impress.

https://bugs.documentfoundation.org/attachment.cgi?id=114666

$ gifsicle -I test_gifs_infinite.gif
* test_gifs_infinite.gif 5 images
  logical screen 696x472
  global color table [8]
  background 0
  loop forever
  + image #0 696x472
    delay 0.50s
  + image #1 696x472
    delay 0.50s
  + image #2 696x472
    delay 0.50s
  + image #3 696x472
    delay 0.50s
  + image #4 696x472


Maybe the zero delay in the last image is problematic in Impress also?
Comment 5 Olivier Delaune 2016-04-04 10:05:41 UTC
Any news about this? It seems that this issue is still present in the latest version
Comment 6 QA Administrators 2017-05-22 13:20:27 UTC Comment hidden (obsolete)
Comment 7 FM 2017-05-25 05:09:57 UTC
The bug is still present in v 5.1.6.2
Comment 8 Alex H. 2017-12-30 12:28:13 UTC
The CERN download links no longer work, but I can confirm that for the April 2015 attachment, Impress loops only once. (This is with a self-built 6.1.0.0.alpha0+ on Windows 10.)

However, I have reason to believe that that GIF does not comply with the standard. I don't know how authoritative this is, but on http://giflib.sourceforge.net/whatsinagif/bits_and_bytes.html it says:

  "The Netscape 2.0 looping block must appear immediately
  after the global color table of the logical screen
  descriptor."

That is not the case with this GIF; the Netscape extension appears much later. In the reader (libo-core\vcl\source\filter\igif\gifread.cxx), there is this:

  if( aAnimation.Count() == 1 )
  {
    aAnimation.SetDisplaySizePixel( Size( nGlobalWidth, nGlobalHeight ) );
    aAnimation.SetLoopCount( nLoops );
  }

so what happens is that nLoops is processed only when the bitmap for the first animation frame is created. For this GIF, nLoops is the default 1 at this point, because the Netscape extension has not been seen yet.

I can confirm, on the other hand, that Firefox 57.0.3 does loop infinitely here, so perhaps LibreOffice is wrong. Again, I'm not sure about what the standard requires.
Comment 10 FM 2018-01-13 02:32:36 UTC
I contacted the ROOT developers. According to them, the bug is in LibreOffice, not in their code.

Their generated GIF files loop correctly in Chrome, Firefox, Safari, Keynote and PowerPoint... so it is working everywhere expect in LibreOffice Impress. The standard specifies that Data Blocks (an Application Extension Block is a Data Block) can appear in any order.

See
https://root-forum.cern.ch/t/gifs-created-by-root-do-not-replay-on-libreoffice-impress/19025/21
Comment 11 QA Administrators 2019-01-14 03:51:40 UTC
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug