Updated Adam's gif and animationplay plugins

-Yosh
This commit is contained in:
Manish Singh 1997-12-12 10:01:21 +00:00
parent fc46ada567
commit 77fa41ad2b
5 changed files with 86 additions and 22 deletions

View File

@ -1,3 +1,7 @@
Fri Dec 12 02:07:26 PST 1997 Manish Singh <yosh@gimp.org>
* Updated gif and animationplay with the new versions
Thu Dec 11 20:56:09 PST 1997 Manish Singh <yosh@gimp.org>
* Removed dgimp (it never worked anyway)

View File

@ -1,5 +1,5 @@
/*
* Animation Playback plug-in version 0.81.7
* Animation Playback plug-in version 0.83.0
*
* by Adam D. Moss, 1997
* adam@gimp.org
@ -11,6 +11,10 @@
/*
* REVISION HISTORY:
*
* 97.12.11 : version 0.83.0
* GTK's timer logic changed a little... adjusted
* plugin to fit.
*
* 97.09.16 : version 0.81.7
* Fixed progress bar's off-by-one problem with
* the new timing. Fixed erroneous black bars which
@ -257,12 +261,17 @@ build_dialog(GImageType basetype,
GtkWidget* dlg;
GtkWidget* button;
GtkWidget* toggle;
GtkWidget* label;
GtkWidget* entry;
GtkWidget* frame;
GtkWidget* frame2;
GtkWidget* vbox;
GtkWidget* vbox2;
GtkWidget* hbox;
GtkWidget* hbox2;
guchar* color_cube;
GSList* group = NULL;
argc = 1;
argv = g_new (gchar *, 1);
@ -389,7 +398,9 @@ build_dialog(GImageType basetype,
static void do_playback(void)
{
int i;
GPixelRgn srcPR, destPR;
guchar *buffer;
int nreturn_vals, i;
width = gimp_image_width(image_id);
height = gimp_image_height(image_id);
@ -875,7 +886,7 @@ window_close_callback (GtkWidget *widget,
gtk_main_quit();
}
static void
static gint
advance_frame_callback (GtkWidget *widget,
gpointer data)
{
@ -884,6 +895,8 @@ advance_frame_callback (GtkWidget *widget,
(GtkFunction) advance_frame_callback, NULL);
show_frame();
do_step();
return FALSE;
}
static void

View File

@ -1,5 +1,5 @@
/*
* Animation Playback plug-in version 0.81.7
* Animation Playback plug-in version 0.83.0
*
* by Adam D. Moss, 1997
* adam@gimp.org
@ -11,6 +11,10 @@
/*
* REVISION HISTORY:
*
* 97.12.11 : version 0.83.0
* GTK's timer logic changed a little... adjusted
* plugin to fit.
*
* 97.09.16 : version 0.81.7
* Fixed progress bar's off-by-one problem with
* the new timing. Fixed erroneous black bars which
@ -257,12 +261,17 @@ build_dialog(GImageType basetype,
GtkWidget* dlg;
GtkWidget* button;
GtkWidget* toggle;
GtkWidget* label;
GtkWidget* entry;
GtkWidget* frame;
GtkWidget* frame2;
GtkWidget* vbox;
GtkWidget* vbox2;
GtkWidget* hbox;
GtkWidget* hbox2;
guchar* color_cube;
GSList* group = NULL;
argc = 1;
argv = g_new (gchar *, 1);
@ -389,7 +398,9 @@ build_dialog(GImageType basetype,
static void do_playback(void)
{
int i;
GPixelRgn srcPR, destPR;
guchar *buffer;
int nreturn_vals, i;
width = gimp_image_width(image_id);
height = gimp_image_height(image_id);
@ -875,7 +886,7 @@ window_close_callback (GtkWidget *widget,
gtk_main_quit();
}
static void
static gint
advance_frame_callback (GtkWidget *widget,
gpointer data)
{
@ -884,6 +895,8 @@ advance_frame_callback (GtkWidget *widget,
(GtkFunction) advance_frame_callback, NULL);
show_frame();
do_step();
return FALSE;
}
static void

View File

@ -3,7 +3,7 @@
* Based around original GIF code by David Koblas.
*
*
* Version 1.99.17 - 97/11/30
* Version 1.99.18 - 97/12/11
*
* Adam D. Moss - <adam@gimp.org> <adam@foxbox.org>
*
@ -22,9 +22,15 @@
/*
* REVISION HISTORY
*
* 97/12/11
* 1.99.18 - Bleh. Disposals should specify how the next frame will
* be composed with this frame, NOT how this frame will
* be composed with the previous frame. Fixed. [Adam]
*
* 97/11/30
* 1.99.17 - No more bogus transparency indices in animated GIFs,
* hopefully. Saved files are better-behaved, sometimes
* smaller. [Adam]files are better-behaved, sometimes
* smaller. [Adam]
*
* 97/09/29
@ -1043,6 +1049,7 @@ ReadImage (FILE *fd,
gchar framename[200]; /* FIXME */
gboolean alpha_frame = FALSE;
int nreturn_vals;
static int previous_disposal;
@ -1080,9 +1087,11 @@ ReadImage (FILE *fd,
else
sprintf(framename, "Background (%dms)", 10*Gif89.delayTime);
switch (Gif89.disposal)
previous_disposal = Gif89.disposal;
/* switch (Gif89.disposal)
{
case 0x00: break; /* 'don't care' */
case 0x00: break;
case 0x01: strcat(framename," (combine)"); break;
case 0x02: strcat(framename," (replace)"); break;
case 0x03: strcat(framename," (combine)"); break;
@ -1092,7 +1101,7 @@ ReadImage (FILE *fd,
case 0x07: printf("GIF: Hmm... please forward this GIF to the "
"GIF plugin author!\n (adam@foxbox.org)\n"); break;
default: printf("GIF: Something got corrupted.\n"); break;
}
}*/
if (Gif89.transparent == -1)
{
@ -1140,7 +1149,7 @@ ReadImage (FILE *fd,
sprintf(framename, "Frame %d (%dms)",
frame_number, 10*Gif89.delayTime);
switch (Gif89.disposal)
switch (previous_disposal)
{
case 0x00: break; /* 'don't care' */
case 0x01: strcat(framename," (combine)"); break;
@ -1157,6 +1166,8 @@ ReadImage (FILE *fd,
default: printf("GIF: Something got corrupted.\n"); break;
}
previous_disposal = Gif89.disposal;
layer_ID = gimp_layer_new (image_ID, framename,
len, height,
promote_to_rgb ? RGBA_IMAGE : INDEXEDA_IMAGE,
@ -1736,11 +1747,17 @@ save_image (char *filename,
if (is_gif89)
{
if (i>0)
{
layer_name = gimp_layer_get_name(layers[i-1]);
Disposal = parse_disposal_tag(layer_name);
g_free(layer_name);
}
else
Disposal = gsvals.default_dispose;
layer_name = gimp_layer_get_name(layers[i]);
Disposal = parse_disposal_tag(layer_name);
Delay89 = parse_ms_tag(layer_name);
g_free(layer_name);
if (Delay89 < 0)

View File

@ -3,7 +3,7 @@
* Based around original GIF code by David Koblas.
*
*
* Version 1.99.17 - 97/11/30
* Version 1.99.18 - 97/12/11
*
* Adam D. Moss - <adam@gimp.org> <adam@foxbox.org>
*
@ -22,9 +22,15 @@
/*
* REVISION HISTORY
*
* 97/12/11
* 1.99.18 - Bleh. Disposals should specify how the next frame will
* be composed with this frame, NOT how this frame will
* be composed with the previous frame. Fixed. [Adam]
*
* 97/11/30
* 1.99.17 - No more bogus transparency indices in animated GIFs,
* hopefully. Saved files are better-behaved, sometimes
* smaller. [Adam]files are better-behaved, sometimes
* smaller. [Adam]
*
* 97/09/29
@ -1043,6 +1049,7 @@ ReadImage (FILE *fd,
gchar framename[200]; /* FIXME */
gboolean alpha_frame = FALSE;
int nreturn_vals;
static int previous_disposal;
@ -1080,9 +1087,11 @@ ReadImage (FILE *fd,
else
sprintf(framename, "Background (%dms)", 10*Gif89.delayTime);
switch (Gif89.disposal)
previous_disposal = Gif89.disposal;
/* switch (Gif89.disposal)
{
case 0x00: break; /* 'don't care' */
case 0x00: break;
case 0x01: strcat(framename," (combine)"); break;
case 0x02: strcat(framename," (replace)"); break;
case 0x03: strcat(framename," (combine)"); break;
@ -1092,7 +1101,7 @@ ReadImage (FILE *fd,
case 0x07: printf("GIF: Hmm... please forward this GIF to the "
"GIF plugin author!\n (adam@foxbox.org)\n"); break;
default: printf("GIF: Something got corrupted.\n"); break;
}
}*/
if (Gif89.transparent == -1)
{
@ -1140,7 +1149,7 @@ ReadImage (FILE *fd,
sprintf(framename, "Frame %d (%dms)",
frame_number, 10*Gif89.delayTime);
switch (Gif89.disposal)
switch (previous_disposal)
{
case 0x00: break; /* 'don't care' */
case 0x01: strcat(framename," (combine)"); break;
@ -1157,6 +1166,8 @@ ReadImage (FILE *fd,
default: printf("GIF: Something got corrupted.\n"); break;
}
previous_disposal = Gif89.disposal;
layer_ID = gimp_layer_new (image_ID, framename,
len, height,
promote_to_rgb ? RGBA_IMAGE : INDEXEDA_IMAGE,
@ -1736,11 +1747,17 @@ save_image (char *filename,
if (is_gif89)
{
if (i>0)
{
layer_name = gimp_layer_get_name(layers[i-1]);
Disposal = parse_disposal_tag(layer_name);
g_free(layer_name);
}
else
Disposal = gsvals.default_dispose;
layer_name = gimp_layer_get_name(layers[i]);
Disposal = parse_disposal_tag(layer_name);
Delay89 = parse_ms_tag(layer_name);
g_free(layer_name);
if (Delay89 < 0)