3.00.01 - Round image timing to nearest 10ms instead of truncating. Insert

Tue Mar 30 20:50:21 BST 1999  Adam D. Moss  <adam@gimp.org>

	* plug-ins/gif/gif.c:
	3.00.01 - Round image timing to nearest 10ms instead of
	truncating.  Insert a mandatory 10ms minimum delay
	for the frames of looping animated GIFs, to avoid
	generating an evil CPU-sucking animation that 'other'
	GIF-animators sometimes like to save.
This commit is contained in:
BST 1999 Adam D. Moss 1999-03-30 19:57:08 +00:00 committed by Adam D. Moss
parent db140e2056
commit f6b28a873b
3 changed files with 61 additions and 6 deletions

View File

@ -1,3 +1,12 @@
Tue Mar 30 20:50:21 BST 1999 Adam D. Moss <adam@gimp.org>
* plug-ins/gif/gif.c:
3.00.01 - Round image timing to nearest 10ms instead of
truncating. Insert a mandatory 10ms minimum delay
for the frames of looping animated GIFs, to avoid
generating an evil CPU-sucking animation that 'other'
GIF-animators sometimes like to save.
Mon Mar 29 19:05:03 PST 1999 Manish Singh <yosh@gimp.org>
* Made 1.1.4 release

View File

@ -7,7 +7,7 @@
* Based around original GIF code by David Koblas.
*
*
* Version 3.0.0 - 99/03/20
* Version 3.0.1 - 99/03/30
* Adam D. Moss - <adam@gimp.org> <adam@foxbox.org>
*/
/*
@ -23,6 +23,13 @@
/*
* REVISION HISTORY
*
* 99/03/30
* 3.00.01 - Round image timing to nearest 10ms instead of
* truncating. Insert a mandatory 10ms minimum delay
* for the frames of looping animated GIFs, to avoid
* generating an evil CPU-sucking animation that 'other'
* GIF-animators sometimes like to save.
*
* 99/03/20
* 3.00.00 - GIF-loading code moved to separate plugin.
*
@ -1058,9 +1065,25 @@ save_image (char *filename,
g_free(layer_name);
if (Delay89 < 0)
Delay89 = gsvals.default_delay/10;
Delay89 = (gsvals.default_delay + 5) / 10;
else
Delay89 /= 10;
Delay89 = (Delay89 + 5) / 10;
/* don't allow a CPU-sucking completely 0-delay looping anim */
if ((nlayers > 1) &&
gsvals.loop &&
(Delay89 == 0))
{
static gboolean onceonly = FALSE;
if (!onceonly)
{
g_warning("GIF plugin: Delay inserted to prevent evil "
"CPU-sucking anim.\n");
onceonly = TRUE;
}
Delay89 = 1;
}
GIFEncodeGraphicControlExt (outfile, Disposal, Delay89, nlayers,
cols, rows, 0,

View File

@ -7,7 +7,7 @@
* Based around original GIF code by David Koblas.
*
*
* Version 3.0.0 - 99/03/20
* Version 3.0.1 - 99/03/30
* Adam D. Moss - <adam@gimp.org> <adam@foxbox.org>
*/
/*
@ -23,6 +23,13 @@
/*
* REVISION HISTORY
*
* 99/03/30
* 3.00.01 - Round image timing to nearest 10ms instead of
* truncating. Insert a mandatory 10ms minimum delay
* for the frames of looping animated GIFs, to avoid
* generating an evil CPU-sucking animation that 'other'
* GIF-animators sometimes like to save.
*
* 99/03/20
* 3.00.00 - GIF-loading code moved to separate plugin.
*
@ -1058,9 +1065,25 @@ save_image (char *filename,
g_free(layer_name);
if (Delay89 < 0)
Delay89 = gsvals.default_delay/10;
Delay89 = (gsvals.default_delay + 5) / 10;
else
Delay89 /= 10;
Delay89 = (Delay89 + 5) / 10;
/* don't allow a CPU-sucking completely 0-delay looping anim */
if ((nlayers > 1) &&
gsvals.loop &&
(Delay89 == 0))
{
static gboolean onceonly = FALSE;
if (!onceonly)
{
g_warning("GIF plugin: Delay inserted to prevent evil "
"CPU-sucking anim.\n");
onceonly = TRUE;
}
Delay89 = 1;
}
GIFEncodeGraphicControlExt (outfile, Disposal, Delay89, nlayers,
cols, rows, 0,