From: GetAway Date: Wed, 2 Aug 2017 18:31:01 +0000 (+0200) Subject: increase to 256 frames in animated gifs X-Git-Url: https://git.webhop.me/?a=commitdiff_plain;h=c7ae1b3a9d46b192081e654127a9c204ea576320;p=tuxwetter.git increase to 256 frames in animated gifs small cleanups bump version to 4.04 --- diff --git a/gif.c b/gif.c index bc79eea..9274574 100644 --- a/gif.c +++ b/gif.c @@ -40,8 +40,8 @@ #define gflush return(FH_ERROR_FILE); #define grflush { DGifCloseFile(gft, &err); return(FH_ERROR_FORMAT); } #define mgrflush { free(lb); free(slb); DGifCloseFile(gft, &err); return(FH_ERROR_FORMAT); } -#define agflush return(FH_ERROR_FORMAT); -#define agrflush { DGifCloseFile(gft, &err); return(FH_ERROR_FORMAT); } +//#define agflush return(FH_ERROR_FORMAT); +//#define agrflush { DGifCloseFile(gft, &err); return(FH_ERROR_FORMAT); } int fh_gif_id(const char *name) { diff --git a/gifdecomp.c b/gifdecomp.c index 86507fb..03c3181 100644 --- a/gifdecomp.c +++ b/gifdecomp.c @@ -77,9 +77,9 @@ int i, err = 0; char tempout[80]; GifByteType *Extension, *CodeBlock; GifFileType *GifFileIn = NULL, *GifFileOut = NULL; - for(i=0; i<32; i++) + for(i=0; i<255; i++) { - sprintf(tempout,"%s%02d.gif",OutFileName,i); + sprintf(tempout,"%s%03d.gif",OutFileName,i); xremove(tempout); } xremove(TempGifName); @@ -159,7 +159,7 @@ int i, err = 0; /* Scan the content of GIF file and dump image(s) to seperate file(s): */ do { - sprintf(CrntFileName, "%s%02d.gif", OutFileName, FileNum++); + sprintf(CrntFileName, "%s%03d.gif", OutFileName, FileNum++); if ((GifFileOut = EGifOpenFileName(CrntFileName, TRUE, &err)) == NULL) QuitGifError(GifFileIn, GifFileOut, err); FileEmpty = TRUE; @@ -251,7 +251,7 @@ void QuitGifError(GifFileType *GifFileIn, GifFileType *GifFileOut, int ErrorCode if (GifFileIn != NULL) DGifCloseFile(GifFileIn, &ErrorCode); if (GifFileOut != NULL) EGifCloseFile(GifFileOut, &ErrorCode); -// exit(EXIT_FAILURE); + exit(EXIT_FAILURE); } diff --git a/tuxwetter.c b/tuxwetter.c index 80ed5dd..1173ac2 100644 --- a/tuxwetter.c +++ b/tuxwetter.c @@ -44,7 +44,7 @@ #include "gifdecomp.h" #include "icons.h" -#define P_VERSION "4.03" +#define P_VERSION "4.04" #define S_VERSION "" @@ -2432,7 +2432,7 @@ unsigned char *buffer=NULL; cloop=0; while(count--) { - sprintf(fname,"%s%02d.gif",GIF_MFILE,cloop++); + sprintf(fname,"%s%03d.gif",GIF_MFILE,cloop++); if(fh_gif_getsize(fname, &x1, &y1, xsize, ysize)) { printf("Tuxwetter \n"); @@ -2449,13 +2449,14 @@ unsigned char *buffer=NULL; fb_set_gmode(1); fb_display(buffer, imx, imy, dxp, dyp, dxo, dyo, 1, 1, 0/*alpha*/); gmodeon=1; - +#if 0 if(gifs>1) { sprintf(fname,"%s %2d / %d", prs_translate("Bild",CONVERT_LIST),cloop, gifs); -// LCD_draw_string(13, 9, fname); -// LCD_update(); + LCD_draw_string(13, 9, fname); + LCD_update(); } +#endif } free(buffer); } @@ -3733,11 +3734,11 @@ PLISTENTRY pl=&epl; CloseRC(); - for(ix=0; ix<32; ix++) - { - sprintf(tstr,"%s%02d.gif",GIF_MFILE,ix); - xremove(tstr); - } + for(ix=0; ix<255; ix++) + { + sprintf(tstr,"%s%03d.gif",GIF_MFILE,ix); + xremove(tstr); + } sprintf(tstr,"ls /tmp/picture* &>/dev/null && rm /tmp/picture*"); system(tstr); xremove("/tmp/tuxwettr.tmp");