From 878143960e2f5589a1b7714e6bd01e634b1ebd74 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 2 Nov 2009 20:55:26 +0000 Subject: [PATCH] support BIG_ENDIAN and jpeg output --- include/mapnik/jpeg_io.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/mapnik/jpeg_io.hpp b/include/mapnik/jpeg_io.hpp index b54c3ca19..0bc8555d9 100644 --- a/include/mapnik/jpeg_io.hpp +++ b/include/mapnik/jpeg_io.hpp @@ -22,6 +22,8 @@ //$Id$ +#include + extern "C" { #include @@ -104,9 +106,15 @@ namespace mapnik { int index=0; for (int i=0;i>24)&0xff; + row[index++]=(imageRow[i]>>16)&0xff; + row[index++]=(imageRow[i]>>8)&0xff; +#else row[index++]=(imageRow[i])&0xff; row[index++]=(imageRow[i]>>8)&0xff; row[index++]=(imageRow[i]>>16)&0xff; +#endif } row_pointer[0] = &row[0]; (void) jpeg_write_scanlines(&cinfo, row_pointer, 1);