Fix thumbnail passing on Windows
LF was converted to CR LF, systematically corrupting bitmap data.
This commit is contained in:
parent
e137afa736
commit
5529727137
9
fiv.c
9
fiv.c
|
@ -25,6 +25,11 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#ifdef G_OS_WIN32
|
||||||
|
#include <io.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#endif // G_OS_WIN32
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include "fiv-browser.h"
|
#include "fiv-browser.h"
|
||||||
|
@ -1807,6 +1812,10 @@ output_thumbnail(const char *path_arg, gboolean extract, const char *size_arg)
|
||||||
exit_fatal("unknown thumbnail size: %s", size_arg);
|
exit_fatal("unknown thumbnail size: %s", size_arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef G_OS_WIN32
|
||||||
|
_setmode(fileno(stdout), _O_BINARY);
|
||||||
|
#endif // G_OS_WIN32
|
||||||
|
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
GFile *file = g_file_new_for_commandline_arg(path_arg);
|
GFile *file = g_file_new_for_commandline_arg(path_arg);
|
||||||
cairo_surface_t *surface = NULL;
|
cairo_surface_t *surface = NULL;
|
||||||
|
|
Loading…
Reference in New Issue