From 9ab799afdeee9e07a59a613f66823b626f038c9c Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Mon, 28 Apr 2014 07:10:21 +0000 Subject: [PATCH] jpg --- ng/ngpkg.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ng/ngpkg.cpp b/ng/ngpkg.cpp index a6faa648..6d7e0209 100644 --- a/ng/ngpkg.cpp +++ b/ng/ngpkg.cpp @@ -336,7 +336,7 @@ namespace netgen if(infile.good()) { infile >> auxstring; - if(auxstring == "csgsurfaces") + if(geometry && auxstring == "csgsurfaces") geometry -> LoadSurfaces(infile); } } @@ -2137,7 +2137,7 @@ namespace netgen cout << "Snapshot to file '" << filename << "'" << endl; int w = Togl_Width (togl); - w = int((w + 1) / 4) * 4 + 4; + // w = int((w + 1) / 4) * 4 + 4; int h = Togl_Height (togl); // unsigned char * buffer = new unsigned char[w*h*4]; @@ -2148,7 +2148,7 @@ namespace netgen struct jpeg_error_mgr jerr; FILE *outfile = fopen(filename,"wb"); JSAMPROW row_pointer[1]; - int row_stride, quality = 85; // 1...100 + int row_stride, quality = 100; // 1...100 cinfo.err = jpeg_std_error( &jerr ); jpeg_create_compress( &cinfo ); @@ -2161,7 +2161,7 @@ namespace netgen cinfo.in_color_space = JCS_RGB; jpeg_set_defaults( &cinfo ); - jpeg_set_quality( &cinfo, quality, TRUE ); + jpeg_set_quality( &cinfo, quality, FALSE ); // TRUE jpeg_start_compress( &cinfo, TRUE ); row_stride = 3*w;