Page 1 of 1

batch generating empty jpeg files

Posted: Tue Dec 04, 2018 8:11 am
by DennisR
Hi, I have a problem under MS Windows. Files attached.
1. When I run GiD as batch with 'gid_offscreen -n -offscreen 1000x1000 -b GidPrintBatch.bch' the generated mesh.jpeg is an empty file.
2. When I start GiD and then run the batch file with 'Utilities' - 'Tools' - 'Read batch file' the generated mesh.jpeg is not empty (it contains a picture of the mesh)

Under Linux it goes ok both in batch mode and interactive mode. Help. Thank you.

Re: batch generating empty jpeg files

Posted: Tue Dec 04, 2018 3:28 pm
by escolano
To get screen images without any window, use gid_offscreen and the flag -offscreen, but don't set the -n flag.
Use this:

'gid_offscreen -offscreen 1000x1000 -b GidPrintBatch.bch'

Note: gid_offscren in Windows is an special gid_offscreen.exe, compiled with the 'mesa library' instead OpenGL, to allow draw in an offscreen buffer. In Linux it is always linked with the mesa library.

Re: batch generating empty jpeg files

Posted: Tue Dec 04, 2018 4:05 pm
by DennisR
I tried, works perfect. Thank you very much.