diff --git a/DesktopEditor/cximage/CxImage/ximacfg.h b/DesktopEditor/cximage/CxImage/ximacfg.h index b13a9afce5..cd3381a555 100644 --- a/DesktopEditor/cximage/CxImage/ximacfg.h +++ b/DesktopEditor/cximage/CxImage/ximacfg.h @@ -21,33 +21,6 @@ ///////////////////////////////////////////////////////////////////////////// // CxImage supported formats -#if defined(BUILDING_WASM_MODULE) - -#define CXIMAGE_SUPPORT_BMP 1 -#define CXIMAGE_SUPPORT_GIF 1 -#define CXIMAGE_SUPPORT_JPG 1 -#define CXIMAGE_SUPPORT_PNG 1 -#define CXIMAGE_SUPPORT_ICO 1 -#define CXIMAGE_SUPPORT_TIF 1 -#define CXIMAGE_SUPPORT_TGA 1 -#define CXIMAGE_SUPPORT_PCX 1 -#define CXIMAGE_SUPPORT_WBMP 0 -#define CXIMAGE_SUPPORT_WMF 0 - -#define CXIMAGE_SUPPORT_JP2 1 -#define CXIMAGE_SUPPORT_JPC 0 -#define CXIMAGE_SUPPORT_PGX 0 -#define CXIMAGE_SUPPORT_PNM 0 -#define CXIMAGE_SUPPORT_RAS 0 - -#define CXIMAGE_SUPPORT_JBG 0 - -#define CXIMAGE_SUPPORT_MNG 0 -#define CXIMAGE_SUPPORT_SKA 0 -#define CXIMAGE_SUPPORT_RAW 0 -#define CXIMAGE_SUPPORT_PSD 0 - -#else #define CXIMAGE_SUPPORT_BMP 1 #define CXIMAGE_SUPPORT_GIF 1 @@ -68,6 +41,15 @@ #define CXIMAGE_SUPPORT_JBG 0 // GPL'd see ../jbig/copying.txt & ../jbig/patents.htm +#if defined(BUILDING_WASM_MODULE) + +#define CXIMAGE_SUPPORT_MNG 0 +#define CXIMAGE_SUPPORT_SKA 0 +#define CXIMAGE_SUPPORT_RAW 0 +#define CXIMAGE_SUPPORT_PSD 0 + +#else + #define CXIMAGE_SUPPORT_MNG 1 #define CXIMAGE_SUPPORT_SKA 1 #define CXIMAGE_SUPPORT_RAW 1 @@ -83,7 +65,11 @@ #define CXIMAGE_ERR_NOFILE "null file handler" #define CXIMAGE_ERR_NOIMAGE "null image!!!" +#if defined(BUILDING_WASM_MODULE) +#define CXIMAGE_SUPPORT_EXCEPTION_HANDLING 0 +#else #define CXIMAGE_SUPPORT_EXCEPTION_HANDLING 1 +#endif // BUILDING_WASM_MODULE ///////////////////////////////////////////////////////////////////////////// //color to grey mapping diff --git a/DesktopEditor/graphics/pro/js/make.py b/DesktopEditor/graphics/pro/js/make.py index 6f84dbcb8b..ff27ca0f30 100644 --- a/DesktopEditor/graphics/pro/js/make.py +++ b/DesktopEditor/graphics/pro/js/make.py @@ -53,7 +53,7 @@ input_cximage_sources = ["ximaenc.cpp", "ximaexif.cpp", "ximage.cpp", "ximainfo. "ximajpg.cpp", "ximalpha.cpp", "ximapal.cpp", "ximasel.cpp", "xmemfile.cpp", "ximapng.cpp", "ximabmp.cpp", "ximatran.cpp", "ximatif.cpp", "tif_xfile.cpp", "ximajas.cpp", "ximagif.cpp", - "ximaico.cpp", "ximatga.cpp", "ximapcx.cpp"] + "ximaico.cpp", "ximatga.cpp", "ximapcx.cpp", "ximawbmp.cpp"] libJpeg_src_path = "./../../../cximage/jpeg" input_jpeg_sources = ["jerror.c", "jdmarker.c", "jdapimin.c", "jdmaster.c", "jdapistd.c", diff --git a/DesktopEditor/graphics/pro/js/qt/test/main.cpp b/DesktopEditor/graphics/pro/js/qt/test/main.cpp index 8c0ee2e9be..10ff5b8d99 100644 --- a/DesktopEditor/graphics/pro/js/qt/test/main.cpp +++ b/DesktopEditor/graphics/pro/js/qt/test/main.cpp @@ -10,7 +10,7 @@ int main() BYTE* pData = NULL; DWORD nBytesCount; NSFile::CFileBinary oFile; - if (!oFile.ReadAllBytes(NSFile::GetProcessDirectory() + L"/test.jp2", &pData, nBytesCount)) + if (!oFile.ReadAllBytes(NSFile::GetProcessDirectory() + L"/test.wbmp", &pData, nBytesCount)) return 1; oFile.CloseFile();