diff --git a/Common/Context.h b/Common/Context.h index 97b1cc26b6c230895b0ae9b09045e8bd50d40eaa..a32ee1c9bc23f8323e6d88fde40e10cc2ca82184 100644 --- a/Common/Context.h +++ b/Common/Context.h @@ -1,4 +1,4 @@ -/* $Id: Context.h,v 1.24 2000-12-27 17:25:52 geuzaine Exp $ */ +/* $Id: Context.h,v 1.25 2000-12-28 18:58:37 geuzaine Exp $ */ #ifndef _CONTEXT_H_ #define _CONTEXT_H_ @@ -143,7 +143,9 @@ class Context_T { /* print options */ struct{ int format; - int eps_quality, jpeg_quality; + int eps_quality; + int jpeg_quality; + int gif_dither, gif_sort, gif_interlace, gif_transparent; char *font; int font_size, gl_fonts; } print; diff --git a/Common/Options.h b/Common/Options.h index d60e256018bc168adfeeaa2aa179f6027761ea8e..d4e274aa5f30bc38fbb20a65b8aec7c62cd4910d 100644 --- a/Common/Options.h +++ b/Common/Options.h @@ -1,4 +1,4 @@ -/* $Id: Options.h,v 1.13 2000-12-27 17:25:52 geuzaine Exp $ */ +/* $Id: Options.h,v 1.14 2000-12-28 18:58:37 geuzaine Exp $ */ #ifndef _OPTIONS_H_ #define _OPTIONS_H_ @@ -197,11 +197,15 @@ StringXNumber PostProcessingOptions_Number[] = { } ; StringXNumber PrintOptions_Number[] = { - { "Format" , GMSH_INT, (void*)&CTX.print.format , FORMAT_AUTO }, - { "EpsQuality" , GMSH_INT, (void*)&CTX.print.eps_quality , 1 }, - { "JpegQuality" , GMSH_INT, (void*)&CTX.print.jpeg_quality , 100 }, - { "FontSize" , GMSH_INT, (void*)&CTX.print.font_size , 12. }, - { NULL , GMSH_DOUBLE, NULL , 0. } + { "Format" , GMSH_INT, (void*)&CTX.print.format , FORMAT_AUTO }, + { "EpsQuality" , GMSH_INT, (void*)&CTX.print.eps_quality , 1 }, + { "JpegQuality" , GMSH_INT, (void*)&CTX.print.jpeg_quality , 100 }, + { "GifDither" , GMSH_INT, (void*)&CTX.print.gif_dither , 1 }, + { "GifSort" , GMSH_INT, (void*)&CTX.print.gif_sort , 1 }, + { "GifInterlace" , GMSH_INT, (void*)&CTX.print.gif_interlace , 0 }, + { "GifTransparent" , GMSH_INT, (void*)&CTX.print.gif_transparent, 0 }, + { "FontSize" , GMSH_INT, (void*)&CTX.print.font_size , 12. }, + { NULL , GMSH_DOUBLE, NULL , 0. } } ; // COLORS diff --git a/DataStr/Malloc.cpp b/DataStr/Malloc.cpp index b2db54f1f330ad2cbb040455af150c26dbe84b65..316b2d924e84d87c81838c7fba3db86d266bc5e3 100644 --- a/DataStr/Malloc.cpp +++ b/DataStr/Malloc.cpp @@ -1,4 +1,4 @@ -/* $Id: Malloc.cpp,v 1.4 2000-11-26 18:43:48 geuzaine Exp $ */ +/* $Id: Malloc.cpp,v 1.5 2000-12-28 18:58:37 geuzaine Exp $ */ #include <stdio.h> #include <stdlib.h> #include <malloc.h> @@ -41,4 +41,5 @@ void Free(void *ptr) { if (ptr == NULL) return; free(ptr); + ptr = NULL; } diff --git a/Unix/CbFile.cpp b/Unix/CbFile.cpp index d3297a8a74e33cce45f526f6d2f6ffff66505761..4f78febc0c489a7dff987689fc08c43ac4581df6 100644 --- a/Unix/CbFile.cpp +++ b/Unix/CbFile.cpp @@ -1,4 +1,4 @@ -/* $Id: CbFile.cpp,v 1.18 2000-12-27 10:07:23 geuzaine Exp $ */ +/* $Id: CbFile.cpp,v 1.19 2000-12-28 18:58:37 geuzaine Exp $ */ #include <unistd.h> @@ -124,7 +124,8 @@ void CreateFile (char *name, int format) { } Replot(); create_jpeg(fp, CTX.viewport[2]-CTX.viewport[0], - CTX.viewport[3]-CTX.viewport[1]); + CTX.viewport[3]-CTX.viewport[1], + CTX.print.jpeg_quality); Msg(INFOS, "JPEG Creation Complete '%s'", name); Msg (INFO, "Wrote File '%s'", name); fclose(fp); @@ -137,7 +138,14 @@ void CreateFile (char *name, int format) { } Replot(); create_gif(fp, CTX.viewport[2]-CTX.viewport[0], - CTX.viewport[3]-CTX.viewport[1]); + CTX.viewport[3]-CTX.viewport[1], + CTX.print.gif_dither, + CTX.print.gif_sort, + CTX.print.gif_interlace, + CTX.print.gif_transparent, + UNPACK_RED(CTX.color.bg), + UNPACK_GREEN(CTX.color.bg), + UNPACK_BLUE(CTX.color.bg)); Msg(INFOS, "GIF Creation Complete '%s'", name); Msg (INFO, "Wrote File '%s'", name); fclose(fp); diff --git a/www/gmsh.html b/www/gmsh.html index 0bbb1f8a5d5e3b73393f6d7c62633ce0ab18d656..cedce8a877ef001187013b733c041e4b28f550b6 100644 --- a/www/gmsh.html +++ b/www/gmsh.html @@ -304,9 +304,9 @@ files. <td><font face="Helvetica, Arial" size=-1> New in 1.00: Added PPM and YUV output; Corrected nested If/Endif; -Corrected seg. fault on repeated saves; Slightly changed the -post-processing file format to allow both single and double precision -numbers. +Corrected several bugs for pixel output and enhanced GIF output +(dithering, transparency); Slightly changed the post-processing file +format to allow both single and double precision numbers. <p> New in 0.999: Added JPEG output and easy MPEG generation (see t8.geo in the tutorial); Clean up of export functions; small fixes; Linux versions