mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
Made the TurboJPEG code for decoding and encoding images disable-able.
--HG-- branch : minor
This commit is contained in:
@@ -43,7 +43,11 @@ namespace magpie
|
||||
Image::Image()
|
||||
{
|
||||
formatHandlers.push_back(new PNGHandler);
|
||||
|
||||
#ifndef LOVE_NO_TURBOJPEG
|
||||
formatHandlers.push_back(new JPEGHandler);
|
||||
#endif
|
||||
|
||||
formatHandlers.push_back(new STBHandler);
|
||||
|
||||
#ifdef LOVE_SUPPORT_IMAGEIO
|
||||
|
||||
@@ -18,8 +18,11 @@
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
**/
|
||||
|
||||
// LOVE
|
||||
#include "JPEGHandler.h"
|
||||
|
||||
#ifndef LOVE_NO_TURBOJPEG
|
||||
|
||||
// LOVE
|
||||
#include "common/Exception.h"
|
||||
#include "common/math.h"
|
||||
|
||||
@@ -161,3 +164,5 @@ FormatHandler::EncodedImage JPEGHandler::encode(const DecodedImage &img, ImageDa
|
||||
} // magpie
|
||||
} // image
|
||||
} // love
|
||||
|
||||
#endif // LOVE_NO_TURBOJPEG
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
#ifndef LOVE_IMAGE_MAGPIE_JPEG_HANDLER_H
|
||||
#define LOVE_IMAGE_MAGPIE_JPEG_HANDLER_H
|
||||
|
||||
#include "common/config.h"
|
||||
|
||||
#ifndef LOVE_NO_TURBOJPEG
|
||||
|
||||
// LOVE
|
||||
#include "FormatHandler.h"
|
||||
#include "thread/threads.h"
|
||||
@@ -72,4 +76,6 @@ private:
|
||||
} // image
|
||||
} // love
|
||||
|
||||
#endif // LOVE_NO_TURBOJPEG
|
||||
|
||||
#endif // LOVE_IMAGE_MAGPIE_JPEG_HANDLER_H
|
||||
|
||||
Reference in New Issue
Block a user