goo/TiffWriter.cc | 11 +++++++++++
1 file changed, 11 insertions(+)
New commits:
commit e24cbeae22d6c8630e292897bd982a87e6290ca6
Author: Steven Lee <[email protected]>
Date: Tue Mar 11 21:24:59 2014 +0100
Fix TIFF writting in Windows
Bug #75969
diff --git a/goo/TiffWriter.cc b/goo/TiffWriter.cc
index d372a5b..3160087 100644
--- a/goo/TiffWriter.cc
+++ b/goo/TiffWriter.cc
@@ -8,6 +8,7 @@
// Copyright (C) 2012 Albert Astals Cid <[email protected]>
// Copyright (C) 2012 Adrian Johnson <[email protected]>
// Copyright (C) 2012 Pino Toscano <[email protected]>
+// Copyright (C) 2014 Steven Lee <[email protected]>
//
//========================================================================
@@ -17,6 +18,10 @@
#include <string.h>
+#ifdef _WIN32
+#include <io.h>
+#endif
+
extern "C" {
#include <tiffio.h>
}
@@ -151,7 +156,13 @@ bool TiffWriter::init(FILE *openedFile, int width, int
height, int hDPI, int vDP
return false;
}
+#ifdef _WIN32
+ //Convert C Library handle to Win32 Handle
+ priv->f = TIFFFdOpen(_get_osfhandle(fileno(openedFile)), "-", "w");
+#else
priv->f = TIFFFdOpen(fileno(openedFile), "-", "w");
+#endif
+
if (!priv->f) {
return false;
_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler