Enclosed is a new Windows executable for mimeTeX, which I believe is fully functional. There is a new command line syntax for invoking it:
mimetex.exe -e outputfile.gif TeX-expression
(TeX-expression should be enclosed in quotes).
The problem turned out to be that when mimetex writes to stdout, newline translation 0x0a --> 0x0d 0x0a is performed. This mucks up gif files. Thanks to John Forkosh for coming up with a quick fix.
I will be rewriting the Moodle filter to use the new command line syntax.
I'm not sure whether or not there might be a similar problem on the Macintosh. Macintosh operating systems prior to OS X used 0x0d as a line separator and Macintosh C compilers used to perform 0x0a --> 0x0d translations on stdout. I don't know whether this is still the case under OS X. But in any case, the new syntax would fix this. Nicolas, can you please recompile mimetex from the new sources? Also please make the following small change in mimetex.c on line 7177 change:
char *query = getenv("QUERY_STRING");
char *query = NULL;
This will allow me to use the same code in the filter for all operating systems.