Update jpeg/png headers in imagecapture.cpp as in image.cpp
parent
dc457430dc
commit
ec7b1acec9
|
@ -13,37 +13,10 @@
|
|||
#include "imagecapture.h"
|
||||
|
||||
extern "C" {
|
||||
#ifdef _WIN32
|
||||
#include "jpeglib.h"
|
||||
#else
|
||||
#ifdef MACOSX
|
||||
#include "../celestia/Celestia.app.skel/Contents/Frameworks/Headers/jpeglib.h"
|
||||
#else
|
||||
#include <jpeglib.h>
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef MACOSX
|
||||
#include "../celestia/Celestia.app.skel/Contents/Frameworks/Headers/png.h"
|
||||
#else
|
||||
#include "png.h"
|
||||
#endif
|
||||
|
||||
// Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng
|
||||
#ifndef png_jmpbuf
|
||||
#define png_jmpbuf(png_ptr) png_ptr->jmpbuf
|
||||
#endif
|
||||
|
||||
#if PNG_LIBPNG_VER < 10004
|
||||
// Define various expansion transformations for old versions of libpng
|
||||
#define png_set_palette_to_rgb(p) png_set_expand(p)
|
||||
#define png_set_gray_1_2_4_to_8(p) png_set_expand(p)
|
||||
#define png_set_tRNS_to_alpha(p) png_set_expand(p)
|
||||
#elif PNG_LIBPNG_VER >= 10500
|
||||
// libpng-1.5 include does not pull in zlib.h
|
||||
#include "zlib.h"
|
||||
#endif
|
||||
#include <png.h>
|
||||
#include <zlib.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -204,5 +177,3 @@ bool CaptureGLBufferToPNG(const string& filename,
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue