Removed RAWZOR
see issue 831
This commit is contained in:
@@ -11,4 +11,4 @@ Build flags: ${CXX_FLAGS}
|
||||
Link flags: ${LFLAGS}
|
||||
OpenMP support: ${OPTION_OMP}
|
||||
MMAP support: ${WITH_MYFILE_MMAP}
|
||||
Rawzor support: ${WITH_RAWZOR}
|
||||
|
||||
|
@@ -58,7 +58,6 @@ endif (APPLE)
|
||||
option (AUTOMATED_BUILD_SYSTEM "TRUE if built by an automate" OFF)
|
||||
|
||||
option (BUILD_SHARED "Build rawtherapee with shared libraries" OFF)
|
||||
option (WITH_RAWZOR "Build with Rawzor support" OFF)
|
||||
option (WITH_BZIP "Build with Bzip2 support" ON)
|
||||
option (WITH_MYFILE_MMAP "Build using memory mapped file" ON)
|
||||
option (OPTION_OMP "Build with OpenMP support" ON)
|
||||
@@ -206,7 +205,6 @@ else (AUTOMATED_BUILD_SYSTEM)
|
||||
-DLFLAGS:STRING=\"${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${UPPER_CMAKE_BUILD_TYPE}}\"
|
||||
-DOPTION_OMP:STRING=${OPTION_OMP}
|
||||
-DWITH_MYFILE_MMAP:STRING=${WITH_MYFILE_MMAP}
|
||||
-DWITH_RAWZOR:STRING=${WITH_RAWZOR}
|
||||
-P ${CMAKE_CURRENT_SOURCE_DIR}/About-Windows.cmake
|
||||
COMMENT "Creating the about file"
|
||||
)
|
||||
@@ -227,7 +225,6 @@ else (AUTOMATED_BUILD_SYSTEM)
|
||||
-DLFLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${UPPER_CMAKE_BUILD_TYPE}}
|
||||
-DOPTION_OMP:STRING=${OPTION_OMP}
|
||||
-DWITH_MYFILE_MMAP:STRING=${WITH_MYFILE_MMAP}
|
||||
-DWITH_RAWZOR:STRING=${WITH_RAWZOR}
|
||||
-P ${CMAKE_CURRENT_SOURCE_DIR}/About-Apple.cmake
|
||||
COMMENT "Creating the about file"
|
||||
)
|
||||
@@ -249,7 +246,6 @@ else (AUTOMATED_BUILD_SYSTEM)
|
||||
-DLFLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${UPPER_CMAKE_BUILD_TYPE}}
|
||||
-DOPTION_OMP:STRING=${OPTION_OMP}
|
||||
-DWITH_MYFILE_MMAP:STRING=${WITH_MYFILE_MMAP}
|
||||
-DWITH_RAWZOR:STRING=${WITH_RAWZOR}
|
||||
-P ${CMAKE_CURRENT_SOURCE_DIR}/About-Linux.cmake
|
||||
COMMENT "Creating the about file"
|
||||
)
|
||||
@@ -267,48 +263,6 @@ else (AUTOMATED_BUILD_SYSTEM)
|
||||
|
||||
endif (AUTOMATED_BUILD_SYSTEM)
|
||||
|
||||
# link rawzor
|
||||
if (WITH_RAWZOR)
|
||||
set (EXTRA_INCDIR ${EXTRA_INCDIR} "${CMAKE_CURRENT_SOURCE_DIR}/rawzor")
|
||||
add_definitions (-DRAWZOR_SUPPORT)
|
||||
if (WIN32)
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
set (EXTRA_LIBDIR ${EXTRA_LIBDIR} "${CMAKE_CURRENT_SOURCE_DIR}/rawzor/win32")
|
||||
set (EXTRA_LIB ${EXTRA_LIB} "rwz_sdk.lib")
|
||||
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/rawzor/win32/rwz_sdk.dll DESTINATION ${BINDIR}
|
||||
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ)
|
||||
elseif (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set (EXTRA_LIBDIR ${EXTRA_LIBDIR} "${CMAKE_CURRENT_SOURCE_DIR}/rawzor/win64")
|
||||
set (EXTRA_LIB ${EXTRA_LIB} "rwz_sdk.lib")
|
||||
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/rawzor/win64/rwz_sdk.dll DESTINATION ${BINDIR}
|
||||
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ)
|
||||
endif (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
elseif (APPLE)
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
set (EXTRA_LIBDIR ${EXTRA_LIBDIR} "${CMAKE_CURRENT_SOURCE_DIR}/rawzor/mac32")
|
||||
set (EXTRA_LIB "-lrwz_sdk")
|
||||
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/rawzor/mac32/rwz_sdk.dylib DESTINATION ${LIBDIR}
|
||||
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||
elseif (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set (EXTRA_LIBDIR ${EXTRA_LIBDIR} "${CMAKE_CURRENT_SOURCE_DIR}/rawzor/mac64")
|
||||
set (EXTRA_LIB "-lrwz_sdk_64")
|
||||
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/rawzor/mac64/rwz_sdk_64.dylib DESTINATION ${LIBDIR}
|
||||
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||
endif (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
else (WIN32)
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
set (EXTRA_LIBDIR ${EXTRA_LIBDIR} "${CMAKE_CURRENT_SOURCE_DIR}/rawzor/lin32")
|
||||
set (EXTRA_LIB ${EXTRA_LIB} "-lrwz_sdk")
|
||||
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/rawzor/lin32/librwz_sdk.so DESTINATION ${LIBDIR}
|
||||
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ RENAME rwz_sdk.so)
|
||||
elseif (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set (EXTRA_LIBDIR ${EXTRA_LIBDIR} "${CMAKE_CURRENT_SOURCE_DIR}/rawzor/lin64")
|
||||
set (EXTRA_LIB ${EXTRA_LIB} "-lrwz_sdk")
|
||||
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/rawzor/lin64/librwz_sdk.so DESTINATION ${LIBDIR}
|
||||
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ RENAME rwz_sdk.so)
|
||||
endif (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
endif (WIN32)
|
||||
endif (WITH_RAWZOR)
|
||||
|
||||
# link witz bzip
|
||||
if (WITH_BZIP)
|
||||
|
@@ -166,8 +166,6 @@ Windows
|
||||
make
|
||||
make install
|
||||
|
||||
Rawzor:
|
||||
provided in RT's source tree (downloaded from http://www.rawzor.com/developers/)
|
||||
|
||||
IMPORTANT:
|
||||
Make sure that the lcms.pc and libiptcdata.pc files located in the pkgconfig dir has the first
|
||||
|
@@ -13,7 +13,6 @@ set(CREDITSDIR . CACHE PATH "Credit file installation path")
|
||||
set(LICENCEDIR . CACHE PATH "Licence file installation path")
|
||||
|
||||
set(BUILD_SHARED OFF CACHE BOOL "Should RT generate shared libraries")
|
||||
set(WITH_RAWZOR ON CACHE BOOL "With Rawzor")
|
||||
set(OPTION_OMP ON CACHE BOOL "Use OpenMP to speedup the preview and batch processing")
|
||||
# set WITH_MYFILE_MMAP to OFF if you experience crash with thumbnail creation (it should be slower, but more reliable)
|
||||
set(WITH_MYFILE_MMAP ON CACHE BOOL "Use the MMAP mechanism to speedup thumbnail creations")
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,55 +0,0 @@
|
||||
Rawzor SDK, Copyright (c)2008-2009 Sachin Garg. All Rights Reserved.
|
||||
http://www.rawzor.com sachingarg@rawzor.com
|
||||
|
||||
This SDK lets you add support for working with .rwz files in your
|
||||
software.
|
||||
|
||||
There are a bunch of functions which decompress the compressed
|
||||
.rwz files to give you back the orignal raw file in its original
|
||||
format.
|
||||
|
||||
Check rwz_sdk.h for details, can there be a better place to
|
||||
document code if not within the code? :-) Sample code is
|
||||
included as an example for how to use the SDK.
|
||||
|
||||
Rest of the 'SDK' is a collection of precompiled binaries built
|
||||
for a variety of platforms, pick the ones you need. Support for
|
||||
more platforms will be added with time, so if your platform of
|
||||
choice isn't already supported, let us know.
|
||||
|
||||
Details of the SDK binaries:
|
||||
|
||||
# mac_osx_32
|
||||
# mac_osx_64
|
||||
|
||||
Universal binaries for 32-bit and 64-bit Apple Mac OSX systems
|
||||
10.4 and above. Built with xcode 3.1. 64 bit binaries are 'fat'
|
||||
binaries containing both 32-bit and 64-bit builds for both intel
|
||||
and non-intel processors.
|
||||
|
||||
# linux_x86
|
||||
# linux_x64
|
||||
|
||||
Binaries for 32-bit and 64-bit Linux systems. Built on Fedora
|
||||
core 10 with no updates/patches installed. Using the default gcc
|
||||
and libraries that come with it.
|
||||
|
||||
# windows_x86
|
||||
# windows_x64
|
||||
|
||||
Binaries for 32-bit and 64-bit Windows systems. Built with
|
||||
Visual Studio 2008 SP1.
|
||||
|
||||
# windows_x86_Z
|
||||
|
||||
These smaller 32-bit windows binaries work exactly like the
|
||||
default binaries but are slightly slower.
|
||||
|
||||
See sdk_license.txt for legal stuff like standard disclaimer etc...
|
||||
|
||||
Note: Things in here are supposed to make your life easier when
|
||||
integrating, not harder. If anything doesn't works the way you
|
||||
expect it to, instead of trying to work-around the issue, just
|
||||
drop us a mail.
|
||||
|
||||
http://www.rawzor.com sachingarg@rawzor.com
|
@@ -1,81 +0,0 @@
|
||||
//Copyright (c)2008 Sachin Garg. All Rights Reserved.
|
||||
//http://www.rawzor.com/ sachingarg@rawzor.com
|
||||
|
||||
#ifndef _rawzor_sdk_pub_h
|
||||
#define _rawzor_sdk_pub_h
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef __export
|
||||
#define _declspec __declspec(dllexport)
|
||||
#else
|
||||
#define _declspec
|
||||
#endif
|
||||
#else
|
||||
#ifdef __export
|
||||
#define _declspec __attribute__ ((visibility("default"),cdecl))
|
||||
#else
|
||||
#define _declspec __attribute__ ((cdecl))
|
||||
#endif
|
||||
#define __cdecl
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Checks if the file loaded in 'data' is a valid rawzor compressed
|
||||
file that this version of rawzor can decompress. If the file can
|
||||
be decompressed returns 0, a positive error code on error.
|
||||
Also gets size of uncompressed raw file.
|
||||
|
||||
NOTE: You don't have to load the entire rwz file in memory just to check
|
||||
that if its a valid rwz file. This function needs only first 50 bytes,
|
||||
set rwz_size to size of memory buffer.
|
||||
|
||||
1 Not a rwz compressed file
|
||||
2 A rwz file that needs a newer version of rawzor SDK to decompress
|
||||
(>2 means other errors)
|
||||
*/
|
||||
_declspec int __cdecl m_rwz_check(char *rwz_data,int rwz_size, int *raw_size);
|
||||
|
||||
|
||||
/* Decompress a rzw file to get the uncompressed raw image file.
|
||||
Returns 0 on success, a positive error code on error.
|
||||
*/
|
||||
_declspec int __cdecl m_rwz_decompress(char *rwz_data,int rwz_size,char *raw_data,int raw_size);
|
||||
|
||||
|
||||
/* Decompress only the raw image's meta data. Recreates the original raw file
|
||||
except the raw pixel data and the embedded thumbnail. Use this function to
|
||||
get quick access to raw file's meta information when the application
|
||||
doesn't needs access to pixel data or thumbnail.
|
||||
|
||||
Returns 0 on success, a positive error code on error.
|
||||
*/
|
||||
_declspec int __cdecl m_rwz_get_meta_only(char *rwz_data,int rwz_size,char *raw_data,int raw_size);
|
||||
|
||||
|
||||
/* Decompress only the raw image's meta data and embedded thumbnail (if any).
|
||||
Recreates the original raw file including the embedded thumbnail but except
|
||||
the raw pixel data. Use this function to get quick access to raw file's
|
||||
meta information or thumbnail when the application doesn't needs access to
|
||||
raw pixel data.
|
||||
|
||||
Returns 0 on success, a positive error code on error.
|
||||
*/
|
||||
_declspec int __cdecl m_rwz_get_meta_and_thumbnail(char *rwz_data,int rwz_size,char *raw_data,int raw_size);
|
||||
|
||||
|
||||
/* Returns the version of SDK core. Can be used for diagnostics or to
|
||||
verify compatibility with SDK when manually parsing .rwz files.
|
||||
|
||||
SDK cannot open .rwz files which need a newer version of SDK, this is
|
||||
also checked by m_rwz_check above.
|
||||
*/
|
||||
_declspec int __cdecl rwz_sdk_get_max_version();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@@ -1,108 +0,0 @@
|
||||
|
||||
NOTE: This is just a standard license agreement and not meant to
|
||||
restrict the use of SDK, if you have any questions or your use of
|
||||
SDK requires any justifiable changes to this license, just drop
|
||||
an email.
|
||||
|
||||
http://www.rawzor.com
|
||||
|
||||
|
||||
License
|
||||
|
||||
You are granted a non-exclusive, nontransferable, royalty-free
|
||||
license to use this Software Development Kit (the "SDK"), mainly
|
||||
including precompiled binaries (the "Binaries"), source code (the
|
||||
"Code"), documentation files (the "Documentation") and Application
|
||||
Program Interface (the "API"). Under this License, You MAY (i) use,
|
||||
modify, and incorporate all or portions of the Code and API into
|
||||
Your own programs (the "User Programs"); (ii) distribute the Binaries
|
||||
and Code in object code format and API as substantially modified or
|
||||
only as part of the User Programs; (iii) use the SDK subject to end
|
||||
user license agreement or conditions stated on the documentation,
|
||||
respectively. (iv) use the SDK solely for the purpose of internal
|
||||
development. You MAY NOT (i) distribute the SDK as a stand-alone
|
||||
product without any modification; (ii) sell, sublicense, rent, loan,
|
||||
or lease the SDK and the documentation to any third party; (iii)
|
||||
reverse engineer, decompile, disassemble or otherwise attempt to
|
||||
discover the source code of the SDK or (iv) breach or violate the
|
||||
Terms of Use subject to Section 2 of this Agreement; (v) use the SDK
|
||||
and the documentation to create any software which is substantially
|
||||
similar to Rawzor (the "Software").
|
||||
|
||||
|
||||
Terms of Use
|
||||
|
||||
Please strictly comply with the terms set forth below under this SDK
|
||||
License Agreement: (i) the Code, API and documentation shall be
|
||||
distributed with User Programs to Your customers under the terms of
|
||||
Your end user license agreement, provided it includes terms that are
|
||||
substantially similar to those applicable to the SDK, as described
|
||||
herein; (ii) You are required to include Rawzor's copyright notices
|
||||
"Portions of this software are Copyright Rawzor" in User Programs
|
||||
which include all or portions of the SDK. (iii) You shall provide
|
||||
Rawzor a copy of User Program, in which the SDK is used.
|
||||
|
||||
|
||||
Intellectual Property Rights
|
||||
|
||||
This SDK is copyrighted and is a proprietary product. You agree to
|
||||
protect author's copyright and other ownership interests in all items
|
||||
in this SDK. You agree that all copies of items in this SDK reproduced
|
||||
and distributed by You subject to the terms of this Agreement will
|
||||
contain the same copyright, trademark, and other proprietary notices as
|
||||
appropriate and appear on or in the master items delivered in this SDK.
|
||||
Except as stated herein, this Agreement does not grant you any rights
|
||||
to patents, copyrights, trade secrets, trademarks, or any other rights
|
||||
in respect to the items in this SDK.
|
||||
|
||||
|
||||
Limitation of Liability
|
||||
|
||||
IN NO EVENT WILL AUTHORS BE LIABLE FOR ANY DAMAGES, INCLUDING ANY LOSS
|
||||
OF PROFITS, OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT
|
||||
OF YOUR USE OR INABILITY TO USE THE SDK, EVEN IF THEY HAVE BEEN
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Some jurisdictions do not
|
||||
allow the exclusion or limitation of incidental, consequential or
|
||||
special damages, so the above limitations may not apply to you.
|
||||
|
||||
|
||||
Disclaimer of Warranty
|
||||
|
||||
SDK is licensed to You only on an "AS IS" basis. With respect to the SDK,
|
||||
Authors makes no representation as to their adequacy for any particular
|
||||
purpose or to produce any particular result. They shall not be liable for
|
||||
loss or damage arising out of this Agreement or from the distribution or
|
||||
use of User Programs. They do not and cannot warrant the performance or
|
||||
results you may obtain by using the SDK. Some jurisdictions do not allow
|
||||
the exclusion or limitation of incidental, consequential or special
|
||||
damages, so the above limitations may not apply to you.
|
||||
|
||||
|
||||
Indemnification
|
||||
|
||||
You agree to indemnify, hold harmless, and defend Authors from and against
|
||||
any claims or lawsuits, including attorneys' reasonable fees, that arise or
|
||||
result from the use or distribution of User Programs using the SDK, provided
|
||||
that they cooperate with You, at Your expense, in defending or settling such
|
||||
claim.
|
||||
|
||||
|
||||
Duration
|
||||
|
||||
This License shall continue for as long as you use the SDK, except
|
||||
that it will terminate if You fail to comply with any term or condition
|
||||
of this Agreement. Upon such termination,or in order for You to terminate
|
||||
the Agreement, You agree to immediately return all full and partial copies
|
||||
of the SDK or destroy all User Programs which have contained all or part
|
||||
of SDK.
|
||||
|
||||
|
||||
Miscellaneous
|
||||
|
||||
This Agreement is governed by the laws of India. If any provision of this
|
||||
Agreement shall be unlawful, void, or for any reason unenforceable, then
|
||||
that provision shall be deemed severed from this Agreement and shall not
|
||||
affect the validity or enforceability of the remaining provisions of this
|
||||
Agreement. This Agreement is the complete statement of the agreement and
|
||||
supersedes any proposal or prior communications between us relating to the
|
||||
subject matter of this Agreement.
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -20,9 +20,6 @@
|
||||
#include <iptcpairs.h>
|
||||
#include <glib/gstdio.h>
|
||||
#include <safegtk.h>
|
||||
#ifdef RAWZOR_SUPPORT
|
||||
#include <rwz_sdk.h>
|
||||
#endif
|
||||
|
||||
#ifndef GLIBMM_EXCEPTIONS_ENABLED
|
||||
#include <memory>
|
||||
@@ -42,42 +39,7 @@ ImageData::ImageData (Glib::ustring fname, RawMetaDataLocation* ri) {
|
||||
int dotpos = fname.find_last_of ('.');
|
||||
root = NULL;
|
||||
iptc = NULL;
|
||||
#ifdef RAWZOR_SUPPORT
|
||||
// RAWZOR support begin
|
||||
if (dotpos<fname.size()-3 && !fname.casefold().compare (dotpos, 4, ".rwz") && ri && (ri->exifBase>=0 || ri->ciffBase>=0)) {
|
||||
FILE* f = safe_g_fopen (fname, "rb");
|
||||
if (f) {
|
||||
fseek (f, 0, SEEK_END);
|
||||
int rzwSize = ftell (f);
|
||||
char* rzwData = new char [rzwSize];
|
||||
fseek (f, 0, SEEK_SET);
|
||||
fread (rzwData, 1, rzwSize, f);
|
||||
fclose(f);
|
||||
int rawSize;
|
||||
if (!m_rwz_check (rzwData, rzwSize, &rawSize)) {
|
||||
char* rawData = new char [rawSize];
|
||||
if (!m_rwz_get_meta_only (rzwData, rzwSize, rawData, rawSize)) {
|
||||
std::string tfname;
|
||||
int fd = Glib::file_open_tmp (tfname, "");
|
||||
FILE* tf = fdopen (fd, "w+b");
|
||||
fwrite (rawData, 1, rawSize, tf);
|
||||
if (ri->exifBase>=0)
|
||||
root = rtexif::ExifManager::parse (tf, ri->exifBase);
|
||||
else if (ri->ciffBase>=0)
|
||||
root = rtexif::ExifManager::parseCIFF (tf, ri->ciffBase, ri->ciffLength);
|
||||
fclose (tf);
|
||||
safe_g_remove (tfname);
|
||||
extractInfo ();
|
||||
}
|
||||
delete [] rawData;
|
||||
|
||||
}
|
||||
delete [] rzwData;
|
||||
}
|
||||
}
|
||||
// RAWZOR support end
|
||||
else
|
||||
#endif
|
||||
if (ri && (ri->exifBase>=0 || ri->ciffBase>=0)) {
|
||||
FILE* f = safe_g_fopen (fname, "rb");
|
||||
if (f) {
|
||||
|
@@ -20,9 +20,6 @@
|
||||
#include <cstdarg>
|
||||
#include <glibmm.h>
|
||||
#include <safegtk.h>
|
||||
#ifdef RAWZOR_SUPPORT
|
||||
#include <rwz_sdk.h>
|
||||
#endif
|
||||
#ifdef BZIP_SUPPORT
|
||||
#include <bzlib.h>
|
||||
#endif
|
||||
@@ -190,26 +187,7 @@ IMFILE* fopen (const char* fname) {
|
||||
fclose (f);
|
||||
mf->pos = 0;
|
||||
mf->eof = false;
|
||||
#ifdef RAWZOR_SUPPORT
|
||||
// RAWZOR support begin
|
||||
bool rawzor = false;
|
||||
Glib::ustring bname = Glib::path_get_basename(fname);
|
||||
int lastdot = bname.find_last_of ('.');
|
||||
if (lastdot!=bname.npos)
|
||||
rawzor = bname.substr (lastdot).casefold() == Glib::ustring(".rwz").casefold();
|
||||
|
||||
if (rawzor) {
|
||||
int realSize = 0;
|
||||
if (!m_rwz_check (mf->data, mf->size, &realSize)) {
|
||||
char* realData = new char [realSize];
|
||||
m_rwz_decompress (mf->data, mf->size, realData, realSize);
|
||||
delete [] mf->data;
|
||||
mf->data = realData;
|
||||
mf->size = realSize;
|
||||
}
|
||||
}
|
||||
// RAWZOR support end
|
||||
#endif
|
||||
return mf;
|
||||
}
|
||||
|
||||
@@ -228,26 +206,6 @@ IMFILE* gfopen (const char* fname) {
|
||||
mf->pos = 0;
|
||||
mf->eof = false;
|
||||
|
||||
#ifdef RAWZOR_SUPPORT
|
||||
// RAWZOR support begin
|
||||
bool rawzor = false;
|
||||
Glib::ustring bname = Glib::path_get_basename(fname);
|
||||
int lastdot = bname.find_last_of ('.');
|
||||
if (lastdot!=bname.npos)
|
||||
rawzor = bname.substr (lastdot).casefold() == Glib::ustring(".rwz").casefold();
|
||||
|
||||
if (rawzor) {
|
||||
int realSize = 0;
|
||||
if (!m_rwz_check (mf->data, mf->size, &realSize)) {
|
||||
char* realData = new char [realSize];
|
||||
m_rwz_decompress (mf->data, mf->size, realData, realSize);
|
||||
delete [] mf->data;
|
||||
mf->data = realData;
|
||||
mf->size = realSize;
|
||||
}
|
||||
}
|
||||
// RAWZOR support end
|
||||
#endif
|
||||
#ifdef BZIP_SUPPORT
|
||||
{
|
||||
bool bzip = false;
|
||||
|
Reference in New Issue
Block a user