Merge branch 'dev' into metadata-exiv2

This commit is contained in:
Lawrence Lee 2023-03-17 22:16:17 -07:00
commit 20e78068cd
No known key found for this signature in database
GPG Key ID: 048FF2B76A63895F
25 changed files with 204 additions and 175 deletions

View File

@ -14,7 +14,7 @@ jobs:
build:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install dependencies
run: |
date -u
@ -48,6 +48,7 @@ jobs:
-DCACHE_NAME_SUFFIX="${RAW_THERAPEE_MAJOR}.${RAW_THERAPEE_MINOR}-${REF}" \
-DPROC_TARGET_NUMBER="1" \
-DPROC_LABEL="generic processor" \
-DCMAKE_OSX_ARCHITECTURES=$(uname -m) \
-DWITH_LTO="OFF" \
-DLENSFUNDBDIR="/Applications/RawTherapee.app/Contents/Resources/share/lensfun" \
-DCMAKE_C_COMPILER=clang \
@ -61,9 +62,10 @@ jobs:
-DOpenMP_libomp_LIBRARY=/usr/local/lib/libomp.dylib \
-DCMAKE_AR=/usr/bin/ar \
-DCMAKE_RANLIB=/usr/bin/ranlib \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
-DOSX_CONTINUOUS=ON \
..
curl -L https://github.com/Homebrew/homebrew-core/raw/679923b4eb48a8dc7ecc1f05d06063cd79b3fc00/Formula/libomp.rb -o libomp.rb && brew install libomp.rb
curl -L https://github.com/Homebrew/homebrew-core/raw/679923b4eb48a8dc7ecc1f05d06063cd79b3fc00/Formula/libomp.rb -o libomp.rb && brew install --formula libomp.rb
zsh -c 'echo "Configured in $(printf "%0.2f" $(($[$(date +%s)-$(cat configstamp)]/$((60.))))) minutes"'
- name: Compile RawTherapee
run: |
@ -77,7 +79,7 @@ jobs:
zsh
date +%s > build/bundlestamp && date -u && cd build
export REF=${GITHUB_REF##*/} && export LOCAL_PREFIX=/usr && sudo make macosx_bundle
export ARTIFACT=(RawTherapee*.zip)
export ARTIFACT=(RawTherapee*${CMAKE_BUILD_TYPE}.zip)
echo "=== artifact: ${ARTIFACT}"
# defining environment variables for next step as per
# https://github.com/actions/starter-workflows/issues/68
@ -91,7 +93,7 @@ jobs:
"ARTIFACT_FILE: ${ARTIFACT_FILE}" \
"PUBLISH_NAME: ${PUBLISH_NAME}"
exit
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: ${{env.ARTIFACT_FILE}}
path: ${{env.ARTIFACT_PATH}}

View File

@ -95,6 +95,8 @@ jobs:
- name: Bundle dependencies
run: |
echo "Listing shared library dependencies."
ldd "./build/${{matrix.build_type}}/rawtherapee.exe"
echo "Getting workspace path."
export BUILD_DIR="$(pwd)/build/${{matrix.build_type}}"
echo "Build directory is '$BUILD_DIR'."
@ -121,6 +123,7 @@ jobs:
"libexpat-1.dll" \
libffi-*.dll \
"libfftw3f-3.dll" \
"libfftw3f_omp-3.dll" \
"libfontconfig-1.dll" \
"libfreetype-6.dll" \
"libfribidi-0.dll" \
@ -204,7 +207,7 @@ jobs:
echo "Creating GTK settings.ini."
mkdir -p "$BUILD_DIR/share/gtk-3.0/"
echo '[Settings] gtk-button-images=1' > "$BUILD_DIR/share/gtk-3.0/settings.ini"
echo -e '[Settings]\ngtk-button-images=1' > "$BUILD_DIR/share/gtk-3.0/settings.ini"
- name: Create installer
if: ${{matrix.build_type == 'release' && (github.ref_type == 'tag' || github.ref_name == 'dev')}}

View File

@ -87,6 +87,9 @@ option(OSX_DEV_BUILD "Generate macOS development builds" OFF)
# On macOS, optionally generate the final zip artifact file without version in the name for nightly upload purposes.
option(OSX_NIGHTLY "Generate a generically-named zip" OFF)
# On macOS, optionally generate RawTherapee_<branch>_macOS_<buildtype>.zip for the CI
option(OSX_CONTINUOUS "Generate a generically-named zip for CI" OFF)
# Generate a universal macOS build
option(OSX_UNIVERSAL "Generate a universal app" OFF)
@ -94,14 +97,13 @@ option(OSX_UNIVERSAL "Generate a universal app" OFF)
if(OSX_UNIVERSAL)
if(NOT "${OSX_UNIVERSAL_URL}")
if(CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
set(OSX_UNIVERSAL_URL "https://kd6kxr.keybase.pub/RawTherapee_macOS_x86_64_latest.zip" CACHE STRING "URL of x86_64 app for lipo")
set(OSX_UNIVERSAL_URL "file:///rawtherapee/latest/RawTherapee_macOS_x86_64_latest.zip" CACHE STRING "URL of x86_64 app for lipo")
else()
set(OSX_UNIVERSAL_URL "https://kd6kxr.keybase.pub/RawTherapee_macOS_arm64_latest.zip" CACHE STRING "URL of arm64 app for lipo")
set(OSX_UNIVERSAL_URL "file:///rawtherapee/latest/RawTherapee_macOS_arm64_latest.zip" CACHE STRING "URL of arm64 app for lipo")
endif()
endif()
endif()
# By default we don't use a specific processor target, so PROC_TARGET_NUMBER is
# set to 0. Specify other values to optimize for specific processor architecture
# as listed in ProcessorTargets.cmake:

View File

@ -1,4 +1,8 @@
![RawTherapee logo](https://raw.githubusercontent.com/Beep6581/RawTherapee/dev/rtdata/images/rt-logo-text-black.svg)
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/Beep6581/RawTherapee/dev/rtdata/images/rt-logo-text-white.svg">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/Beep6581/RawTherapee/dev/rtdata/images/rt-logo-text-black.svg">
<img alt="RawTherapee logo" src="[https://user-images.githubusercontent.com/25423296/163456779-a8556205-d0a5-45e2-ac17-42d089e3c3f8.png](https://raw.githubusercontent.com/Beep6581/RawTherapee/dev/rtdata/images/rt-logo-text-black.svg)">
</picture>
![RawTherapee screenshot](http://rawtherapee.com/images/carousel/100_rt59_provence_local_maskxxx.jpg)

View File

@ -2072,6 +2072,7 @@ SAMPLEFORMAT_16;16-bit floating-point
SAMPLEFORMAT_32;24-bit floating-point
SAMPLEFORMAT_64;32-bit floating-point
SAVEDLG_AUTOSUFFIX;Automatically add a suffix if the file already exists
SAVEDLG_BIGTIFF;BigTIFF (no metadata support)
SAVEDLG_FILEFORMAT;File format
SAVEDLG_FILEFORMAT_FLOAT; floating-point
SAVEDLG_FORCEFORMATOPTS;Force saving options

View File

@ -2175,6 +2175,16 @@ Camera constants:
"dcraw_matrix" : [8360, -2420, -880, -3928, 12353, 1739, -1381, 2416, 5173] // DNG
},
{ // Quality C
"make_model": ["OM Digital Solutions OM-1"],
"ranges": { "white": 4095 },
"raw_crop" : [
{ "frame" : [10400, 7792], "crop": [0, 0, 10390, 7792] },
{ "frame" : [8180, 6132], "crop": [0, 0, 8172, 6132] },
{ "frame" : [5220, 3912], "crop": [0, 0, 5220, 3912] }
]
},
{ // Quality B
"make_model": [ "Panasonic DC-LX100M2" ],
"dcraw_matrix": [ 11577, -4230, -1106, -3967, 12211, 1957, -759, 1762, 5610 ], // DNG v13.2

View File

@ -3764,15 +3764,17 @@ void ColorTemp::tempxy(bool separated, int repref, float **Tx, float **Ty, float
Refxyz[i].Zref = 0.f;
}
if (settings->verbose) {
/* if (settings->verbose) {
if (settings->itcwb_stdobserver10 == false) {//I will try to change settings by main
printf("Use standard observer 2°\n");
} else {
printf("Use standard observer 10°\n");
}
}
const color_match_type &color_match = (settings->itcwb_stdobserver10 == true) ? cie_colour_match_jd : cie_colour_match_jd2;
}
*/
const color_match_type &color_match = (settings->observer10 == true) ? cie_colour_match_jd : cie_colour_match_jd2;
// const color_match_type &color_match = (settings->itcwb_stdobserver10 == true) ? cie_colour_match_jd : cie_colour_match_jd2;
if (separated) {
const double tempw = Txyz[repref].Tem;

View File

@ -5546,9 +5546,11 @@ void CLASS parse_makernote (int base, int uptag)
offset = get4();
fseek (ifp, offset-8, SEEK_CUR);
} else if (!strcmp (buf,"OLYMPUS") ||
!strcmp (buf,"PENTAX ")) {
!strcmp (buf,"PENTAX ") ||
!strncmp(buf,"OM SYS",6)) { // From LibRaw
base = ftell(ifp)-10;
fseek (ifp, -2, SEEK_CUR);
if (buf[1] == 'M') get4(); // From LibRaw
order = get2();
if (buf[0] == 'O') get2();
} else if (!strncmp (buf,"SONY",4) ||
@ -7172,7 +7174,7 @@ void CLASS apply_tiff()
if (tiff_ifd[raw].bytes*4 == raw_width*raw_height*7) break;
load_flags = 0;
case 16: load_raw = &CLASS unpacked_load_raw;
if (!strncmp(make,"OLYMPUS",7) &&
if ((!strncmp(make,"OLYMPUS",7) || !strncmp(make, "OM Digi", 7)) && // OM Digi from LibRaw
tiff_ifd[raw].bytes*7 > raw_width*raw_height)
load_raw = &CLASS olympus_load_raw;
// ------- RT -------
@ -8704,6 +8706,8 @@ void CLASS adobe_coeff (const char *make, const char *model)
{ 10901,-4095,-1074,-1141,9208,2293,-62,1417,5158 } },
{ "Olympus XZ-2", 0, 0,
{ 9777,-3483,-925,-2886,11297,1800,-602,1663,5134 } },
{ "OM Digital Solutions OM-1", 0, 0,
{ 9488, -3984, -714, -2887, 10945, 2229, -137, 960, 5786 } }, // From LibRaw
{ "OmniVision", 0, 0, /* DJC */
{ 12782,-4059,-379,-478,9066,1413,1340,1513,5176 } },
{ "Pentax *ist DL2", 0, 0,

View File

@ -1882,7 +1882,13 @@ public:
* @param bps can be 8 or 16 depending on the bits per pixels the output file will have
* @param isFloat is true for saving float images. Will be ignored by file format not supporting float data
@return the error code, 0 if none */
virtual int saveAsTIFF (const Glib::ustring &fname, int bps = -1, bool isFloat = false, bool uncompressed = false) const = 0;
virtual int saveAsTIFF (
const Glib::ustring &fname,
int bps = -1,
bool isFloat = false,
bool uncompressed = false,
bool big = false
) const = 0;
/** @brief Sets the progress listener if you want to follow the progress of the image saving operations (optional).
* @param pl is the pointer to the class implementing the ProgressListener interface */
virtual void setSaveProgressListener (ProgressListener* pl) = 0;

View File

@ -81,7 +81,7 @@ public:
return saveJPEG(fname, quality, subSamp);
}
int saveAsTIFF(const Glib::ustring &fname, int bps = -1, bool isFloat = false, bool uncompressed = false) const override
int saveAsTIFF(const Glib::ustring &fname, int bps = -1, bool isFloat = false, bool uncompressed = false, bool big = false) const override
{
return saveTIFF(fname, bps, isFloat, uncompressed);
}

View File

@ -79,9 +79,15 @@ public:
return saveJPEG (fname, quality, subSamp);
}
int saveAsTIFF (const Glib::ustring &fname, int bps = -1, bool isFloat = false, bool uncompressed = false) const override
int saveAsTIFF (
const Glib::ustring &fname,
int bps = -1,
bool isFloat = false,
bool uncompressed = false,
bool big = false
) const override
{
return saveTIFF (fname, bps, isFloat, uncompressed);
return saveTIFF (fname, bps, isFloat, uncompressed, big);
}
void setSaveProgressListener (ProgressListener* pl) override

View File

@ -82,9 +82,15 @@ public:
{
return saveJPEG (fname, quality, subSamp);
}
int saveAsTIFF (const Glib::ustring &fname, int bps = -1, bool isFloat = false, bool uncompressed = false) const override
int saveAsTIFF (
const Glib::ustring &fname,
int bps = -1,
bool isFloat = false,
bool uncompressed = false,
bool big = false
) const override
{
return saveTIFF (fname, bps, isFloat, uncompressed);
return saveTIFF (fname, bps, isFloat, uncompressed, big);
}
void setSaveProgressListener (ProgressListener* pl) override
{

View File

@ -17,19 +17,18 @@
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
*/
#include <png.h>
#include <glib/gstdio.h>
#include <tiff.h>
#include <tiffio.h>
#include <cstdio>
#include <cstring>
#include <fcntl.h>
#include <memory>
#include "rt_math.h"
#include "procparams.h"
#include "utils.h"
#include "../rtgui/options.h"
#include "../rtgui/version.h"
#include <string>
#include <utility>
#include <vector>
#include <fcntl.h>
#include <glib/gstdio.h>
#include <png.h>
#include <tiff.h>
#include <tiffio.h>
#ifdef WIN32
#include <winsock2.h>
@ -37,13 +36,19 @@
#include <netinet/in.h>
#endif
#include "imageio.h"
#include "iccjpeg.h"
#include "color.h"
#include "iccjpeg.h"
#include "imagedata.h"
#include "settings.h"
#include "imageio.h"
#include "jpeg.h"
#include "procparams.h"
#include "rt_math.h"
#include "settings.h"
#include "utils.h"
#include "../rtgui/options.h"
#include "../rtgui/version.h"
using namespace std;
using namespace rtengine;
@ -1099,7 +1104,13 @@ int ImageIO::saveJPEG (const Glib::ustring &fname, int quality, int subSamp) con
}
int ImageIO::saveTIFF (const Glib::ustring &fname, int bps, bool isFloat, bool uncompressed) const
int ImageIO::saveTIFF (
const Glib::ustring &fname,
int bps,
bool isFloat,
bool uncompressed,
bool big
) const
{
if (getWidth() < 1 || getHeight() < 1) {
return IMIO_HEADERERROR;
@ -1113,23 +1124,26 @@ int ImageIO::saveTIFF (const Glib::ustring &fname, int bps, bool isFloat, bool u
bps = getBPS ();
}
int lineWidth = width * 3 * bps / 8;
unsigned char* linebuffer = new unsigned char[lineWidth];
int lineWidth = width * 3 * (bps / 8);
std::vector<unsigned char> linebuffer(lineWidth);
std::string mode = "w";
if (big) {
mode += '8';
}
// little hack to get libTiff to use proper byte order (see TIFFClienOpen()):
const char* const mode = "w";
#ifdef WIN32
FILE *file = g_fopen_withBinaryAndLock (fname);
int fileno = _fileno(file);
int osfileno = _get_osfhandle(fileno);
TIFF* out = TIFFFdOpen (osfileno, fname.c_str(), mode);
TIFF* out = TIFFFdOpen (osfileno, fname.c_str(), mode.c_str());
#else
TIFF* out = TIFFOpen(fname.c_str(), mode);
TIFF* out = TIFFOpen(fname.c_str(), mode.c_str());
// int fileno = TIFFFileno (out);
#endif
if (!out) {
delete [] linebuffer;
return IMIO_CANNOTWRITEFILE;
}
@ -1185,32 +1199,25 @@ int ImageIO::saveTIFF (const Glib::ustring &fname, int bps, bool isFloat, bool u
}
for (int row = 0; row < height; row++) {
getScanline (row, linebuffer, bps, isFloat);
getScanline (row, linebuffer.data(), bps, isFloat);
if (bps == 16) {
if(needsReverse && !uncompressed && isFloat) {
for(int i = 0; i < lineWidth; i += 2) {
char temp = linebuffer[i];
linebuffer[i] = linebuffer[i + 1];
linebuffer[i + 1] = temp;
std::swap(linebuffer[i], linebuffer[i + 1]);
}
}
} else if (bps == 32) {
if(needsReverse && !uncompressed) {
for(int i = 0; i < lineWidth; i += 4) {
char temp = linebuffer[i];
linebuffer[i] = linebuffer[i + 3];
linebuffer[i + 3] = temp;
temp = linebuffer[i + 1];
linebuffer[i + 1] = linebuffer[i + 2];
linebuffer[i + 2] = temp;
std::swap(linebuffer[i], linebuffer[i + 3]);
std::swap(linebuffer[i + 1], linebuffer[i + 2]);
}
}
}
if (TIFFWriteScanline (out, linebuffer, row, 0) < 0) {
if (TIFFWriteScanline (out, linebuffer.data(), row, 0) < 0) {
TIFFClose (out);
delete [] linebuffer;
return IMIO_CANNOTWRITEFILE;
}
@ -1228,8 +1235,6 @@ int ImageIO::saveTIFF (const Glib::ustring &fname, int bps, bool isFloat, bool u
fclose (file);
#endif
delete [] linebuffer;
if (!saveMetadata(fname)) {
writeOk = false;
}

View File

@ -101,7 +101,13 @@ public:
int savePNG (const Glib::ustring &fname, int bps = -1) const;
int saveJPEG (const Glib::ustring &fname, int quality = 100, int subSamp = 3) const;
int saveTIFF (const Glib::ustring &fname, int bps = -1, bool isFloat = false, bool uncompressed = false) const;
int saveTIFF (
const Glib::ustring &fname,
int bps = -1,
bool isFloat = false,
bool uncompressed = false,
bool big = false
) const;
cmsHPROFILE getEmbeddedProfile () const;
void getEmbeddedProfileData (int& length, unsigned char*& pdata) const;

View File

@ -164,6 +164,7 @@ ImProcCoordinator::ImProcCoordinator() :
imageTypeListener(nullptr),
filmNegListener(nullptr),
actListener(nullptr),
primListener(nullptr),
adnListener(nullptr),
awavListener(nullptr),
dehaListener(nullptr),

View File

@ -8156,7 +8156,7 @@ void ImProcFunctions::calc_ref(int sp, LabImage * original, LabImage * transform
deltasobelL = new LabImage(spotSi, spotSi);
bool isdenoise = false;
if ((lp.noiself > 0.f || lp.noiself0 > 0.f || lp.noiself2 > 0.f || lp.wavcurvedenoi || lp.noiselc > 0.f || lp.noisecf > 0.f || lp.noisecc > 0.f) && lp.denoiena) {
if ((lp.noiself > 0.f || lp.noiself0 > 0.f || lp.noiself2 > 0.f || lp.wavcurvedenoi || lp.nlstr > 0 || lp.noiselc > 0.f || lp.noisecf > 0.f || lp.noisecc > 0.f) && lp.denoiena) {
isdenoise = true;
}
@ -10882,7 +10882,7 @@ void ImProcFunctions::DeNoise(int call, float * slidL, float * slida, float * sl
// const int hspot = ye - ys;
// const int wspot = xe - xs;
if (((lp.noiself > 0.f || lp.noiself0 > 0.f || lp.noiself2 > 0.f || lp.nlstr > 0 || lp.wavcurvedenoi || lp.noiselc > 0.f || lp.noisecf > 0.f || lp.noisecc > 0.f
if (((lp.noiself > 0.f || lp.noiself0 > 0.f || lp.noiself2 > 0.f || lp.nlstr > 0 || lp.wavcurvedenoi || lp.noiselc > 0.f || lp.noisecf > 0.f || lp.noisecc > 0.f
|| execmaskden || aut == 1 || aut == 2) && lp.denoiena && lp.quamet != 3) || execdenoi) { // sk == 1 ??
StopWatch Stop1("locallab Denoise called");
@ -13016,7 +13016,6 @@ void ImProcFunctions::NLMeans(float **img, int strength, int detail_thresh, int
if(scale > 5.f) {//avoid to small values - leads to crash - but enough to evaluate noise
return;
}
BENCHFUN
const int W = bfw;
const int H = bfh;
@ -13657,7 +13656,7 @@ void ImProcFunctions::Lab_Local(
//Prepare mask for Blur and noise and Denoise
bool denoiz = false;
if ((lp.noiself > 0.f || lp.noiself0 > 0.f || lp.noiself2 > 0.f || lp.noiselc > 0.f || lp.wavcurvedenoi || lp.noisecf > 0.f || lp.noisecc > 0.f || lp.bilat > 0.f) && lp.denoiena) {
if ((lp.noiself > 0.f || lp.noiself0 > 0.f || lp.noiself2 > 0.f || lp.noiselc > 0.f || lp.wavcurvedenoi || lp.nlstr > 0 || lp.noisecf > 0.f || lp.noisecc > 0.f || lp.bilat > 0.f) && lp.denoiena) {
denoiz = true;
}
@ -14401,7 +14400,7 @@ void ImProcFunctions::Lab_Local(
}
//local denoise
if (lp.activspot && lp.denoiena && (lp.noiself > 0.f || lp.noiself0 > 0.f || lp.noiself2 > 0.f || lp.wavcurvedenoi || lp.noiselc > 0.f || lp.noisecf > 0.f || lp.noisecc > 0.f )) {//disable denoise if not used
if (lp.activspot && lp.denoiena && (lp.noiself > 0.f || lp.noiself0 > 0.f || lp.noiself2 > 0.f || lp.wavcurvedenoi ||lp.nlstr > 0 || lp.noiselc > 0.f || lp.noisecf > 0.f || lp.noisecc > 0.f )) {//disable denoise if not used
float slidL[8] = {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f};
float slida[8] = {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f};
float slidb[8] = {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f};

View File

@ -264,6 +264,7 @@ bool BatchQueue::saveBatchQueue ()
<< saveFormat.tiffBits << '|' << (saveFormat.tiffFloat ? 1 : 0) << '|' << saveFormat.tiffUncompressed << '|'
<< saveFormat.saveParams << '|' << entry->forceFormatOpts << '|'
<< entry->fast_pipeline << '|'
<< saveFormat.bigTiff << '|'
<< std::endl;
}
}
@ -331,6 +332,7 @@ bool BatchQueue::loadBatchQueue ()
const auto saveParams = nextIntOr (options.saveFormat.saveParams);
const auto forceFormatOpts = nextIntOr (options.forceFormatOpts);
const auto fast = nextIntOr(false);
const auto bigTiff = nextIntOr (options.saveFormat.bigTiff);
rtengine::procparams::ProcParams pparams;
@ -370,6 +372,7 @@ bool BatchQueue::loadBatchQueue ()
saveFormat.tiffBits = tiffBits;
saveFormat.tiffFloat = tiffFloat == 1;
saveFormat.tiffUncompressed = tiffUncompressed != 0;
saveFormat.bigTiff = bigTiff != 0;
saveFormat.saveParams = saveParams != 0;
entry->forceFormatOpts = forceFormatOpts != 0;
} else {
@ -693,7 +696,13 @@ rtengine::ProcessingJob* BatchQueue::imageReady(rtengine::IImagefloat* img)
int err = 0;
if (saveFormat.format == "tif") {
err = img->saveAsTIFF (fname, saveFormat.tiffBits, saveFormat.tiffFloat, saveFormat.tiffUncompressed);
err = img->saveAsTIFF (
fname,
saveFormat.tiffBits,
saveFormat.tiffFloat,
saveFormat.tiffUncompressed,
saveFormat.bigTiff
);
} else if (saveFormat.format == "png") {
err = img->saveAsPNG (fname, saveFormat.pngBits);
} else if (saveFormat.format == "jpg") {

View File

@ -201,6 +201,9 @@ std::tuple<Glib::ustring, bool> BatchQueueEntry::getToolTip (int x, int y) const
if (saveFormat.tiffUncompressed) {
tooltip += Glib::ustring::compose("\n%1", M("SAVEDLG_TIFFUNCOMPRESSED"));
}
if (saveFormat.bigTiff) {
tooltip += Glib::ustring::compose("\n%1", M("SAVEDLG_BIGTIFF"));
}
}
}
}

View File

@ -2020,7 +2020,7 @@ bool EditorPanel::idle_saveImage (ProgressConnector<rtengine::IImagefloat*> *pc,
img->setSaveProgressListener (parent->getProgressListener());
if (sf.format == "tif")
ld->startFunc (sigc::bind (sigc::mem_fun (img, &rtengine::IImagefloat::saveAsTIFF), fname, sf.tiffBits, sf.tiffFloat, sf.tiffUncompressed),
ld->startFunc (sigc::bind (sigc::mem_fun (img, &rtengine::IImagefloat::saveAsTIFF), fname, sf.tiffBits, sf.tiffFloat, sf.tiffUncompressed, sf.bigTiff),
sigc::bind (sigc::mem_fun (*this, &EditorPanel::idle_imageSaved), ld, img, fname, sf, pparams));
else if (sf.format == "png")
ld->startFunc (sigc::bind (sigc::mem_fun (img, &rtengine::IImagefloat::saveAsPNG), fname, sf.pngBits),
@ -2277,7 +2277,7 @@ bool EditorPanel::saveImmediately (const Glib::ustring &filename, const SaveForm
if (gimpPlugin) {
err = img->saveAsTIFF (filename, 32, true, true);
} else if (sf.format == "tif") {
err = img->saveAsTIFF (filename, sf.tiffBits, sf.tiffFloat, sf.tiffUncompressed);
err = img->saveAsTIFF (filename, sf.tiffBits, sf.tiffFloat, sf.tiffUncompressed, sf.bigTiff);
} else if (sf.format == "png") {
err = img->saveAsPNG (filename, sf.pngBits);
} else if (sf.format == "jpg") {
@ -2387,7 +2387,7 @@ bool EditorPanel::idle_sendToGimp ( ProgressConnector<rtengine::IImagefloat*> *p
ProgressConnector<int> *ld = new ProgressConnector<int>();
img->setSaveProgressListener (parent->getProgressListener());
ld->startFunc (sigc::bind (sigc::mem_fun (img, &rtengine::IImagefloat::saveAsTIFF), fileName, sf.tiffBits, sf.tiffFloat, sf.tiffUncompressed),
ld->startFunc (sigc::bind (sigc::mem_fun (img, &rtengine::IImagefloat::saveAsTIFF), fileName, sf.tiffBits, sf.tiffFloat, sf.tiffUncompressed, sf.bigTiff),
sigc::bind (sigc::mem_fun (*this, &EditorPanel::idle_sentToGimp), ld, img, fileName));
} else {
Glib::ustring msg_ = Glib::ustring ("<b> Error during image processing\n</b>");

View File

@ -313,6 +313,7 @@ void Options::setDefaults()
saveFormat.tiffBits = 16;
saveFormat.tiffFloat = false;
saveFormat.tiffUncompressed = true;
saveFormat.bigTiff = false;
saveFormat.saveParams = true;
saveFormatBatch.format = "jpg";
@ -1049,6 +1050,10 @@ void Options::readFromFile(Glib::ustring fname)
saveFormat.tiffUncompressed = keyFile.get_boolean("Output", "TiffUncompressed");
}
if (keyFile.has_key("Output", "BigTiff")) {
saveFormat.bigTiff = keyFile.get_boolean("Output", "BigTiff");
}
if (keyFile.has_key("Output", "SaveProcParams")) {
saveFormat.saveParams = keyFile.get_boolean("Output", "SaveProcParams");
}
@ -2471,6 +2476,7 @@ void Options::saveToFile(Glib::ustring fname)
keyFile.set_integer("Output", "TiffBps", saveFormat.tiffBits);
keyFile.set_boolean("Output", "TiffFloat", saveFormat.tiffFloat);
keyFile.set_boolean("Output", "TiffUncompressed", saveFormat.tiffUncompressed);
keyFile.set_boolean("Output", "BigTiff", saveFormat.bigTiff);
keyFile.set_boolean("Output", "SaveProcParams", saveFormat.saveParams);
keyFile.set_string("Output", "FormatBatch", saveFormatBatch.format);

View File

@ -72,6 +72,7 @@ struct SaveFormat {
int _tiff_bits,
bool _tiff_float,
bool _tiff_uncompressed,
bool _big_tiff,
bool _save_params
) :
format(_format),
@ -81,6 +82,7 @@ struct SaveFormat {
tiffBits(_tiff_bits),
tiffFloat(_tiff_float),
tiffUncompressed(_tiff_uncompressed),
bigTiff(_big_tiff),
saveParams(_save_params)
{
}
@ -98,6 +100,7 @@ struct SaveFormat {
_tiff_bits,
_tiff_float,
true,
false,
true
)
{
@ -114,6 +117,7 @@ struct SaveFormat {
int tiffBits;
bool tiffFloat;
bool tiffUncompressed;
bool bigTiff;
bool saveParams;
};

View File

@ -71,7 +71,7 @@ SaveFormatPanel::SaveFormatPanel () : listener (nullptr)
jpegOpts->set_row_spacing(5);
setExpandAlignProperties(jpegOpts, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
jpegQual = new Adjuster (M("SAVEDLG_JPEGQUAL"), 0, 100, 1, 100);
jpegQual = Gtk::manage (new Adjuster (M("SAVEDLG_JPEGQUAL"), 0, 100, 1, 100) );
setExpandAlignProperties(jpegQual, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
jpegQual->setAdjusterListener (this);
@ -95,11 +95,16 @@ SaveFormatPanel::SaveFormatPanel () : listener (nullptr)
// --------------------- TIFF OPTIONS
tiffUncompressed = new Gtk::CheckButton (M("SAVEDLG_TIFFUNCOMPRESSED"));
tiffUncompressed = Gtk::manage (new Gtk::CheckButton (M("SAVEDLG_TIFFUNCOMPRESSED")) );
setExpandAlignProperties(tiffUncompressed, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
tiffUncompressed->signal_toggled().connect( sigc::mem_fun(*this, &SaveFormatPanel::formatChanged));
tiffUncompressed->show_all();
bigTiff = Gtk::manage (new Gtk::CheckButton (M("SAVEDLG_BIGTIFF")) );
setExpandAlignProperties(bigTiff, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
bigTiff->signal_toggled().connect( sigc::mem_fun(*this, &SaveFormatPanel::formatChanged));
bigTiff->show_all();
// --------------------- MAIN BOX
@ -114,13 +119,11 @@ SaveFormatPanel::SaveFormatPanel () : listener (nullptr)
attach (*hb1, 0, 0, 1, 1);
attach (*jpegOpts, 0, 1, 1, 1);
attach (*tiffUncompressed, 0, 2, 1, 1);
attach (*bigTiff, 0, 3, 1, 1);
attach (*savesPP, 0, 4, 1, 2);
}
SaveFormatPanel::~SaveFormatPanel ()
{
delete jpegQual;
delete tiffUncompressed;
}
SaveFormatPanel::~SaveFormatPanel () = default;
void SaveFormatPanel::init (SaveFormat &sf)
{
@ -158,6 +161,7 @@ void SaveFormatPanel::init (SaveFormat &sf)
jpegQual->setValue(sf.jpegQuality);
savesPP->set_active(sf.saveParams);
tiffUncompressed->set_active(sf.tiffUncompressed);
bigTiff->set_active(sf.bigTiff);
listener = tmp;
}
@ -175,6 +179,7 @@ SaveFormat SaveFormatPanel::getFormat ()
sf.jpegQuality = jpegQual->getValue();
sf.jpegSubSamp = jpegSubSamp->get_active_row_number() + 1;
sf.tiffUncompressed = tiffUncompressed->get_active();
sf.bigTiff = bigTiff->get_active();
sf.saveParams = savesPP->get_active();
return sf;
@ -193,12 +198,15 @@ void SaveFormatPanel::formatChanged ()
if (fr == "jpg") {
jpegOpts->show_all();
tiffUncompressed->hide();
bigTiff->hide();
} else if (fr == "png") {
jpegOpts->hide();
tiffUncompressed->hide();
bigTiff->hide();
} else if (fr == "tif") {
jpegOpts->hide();
tiffUncompressed->show_all();
bigTiff->show_all();
}
if (listener) {

View File

@ -39,6 +39,7 @@ class SaveFormatPanel : public Gtk::Grid, public AdjusterListener, public rtengi
protected:
Adjuster* jpegQual;
Gtk::CheckButton* tiffUncompressed;
Gtk::CheckButton* bigTiff;
MyComboBoxText* format;
MyComboBoxText* jpegSubSamp;
Gtk::Grid* formatOpts;

View File

@ -1,31 +0,0 @@
diff --git a/lib/iconv.c b/lib/iconv.c
index b7a04f8..41c5896 100644
--- a/lib/iconv.c
+++ b/lib/iconv.c
@@ -610,5 +610,26 @@ strong_alias (libiconv_open, iconv_open)
strong_alias (libiconv, iconv)
strong_alias (libiconv_close, iconv_close)
#endif
+
+#undef iconv_open
+#undef iconv
+#undef iconv_close
+
+LIBICONV_DLL_EXPORTED iconv_t iconv_open (const char* tocode, const char* fromcode)
+{
+ return libiconv_open(tocode, fromcode);
+}
+
+LIBICONV_DLL_EXPORTED size_t iconv (iconv_t icd,
+ ICONV_CONST char * * inbuf, size_t *inbytesleft,
+ char * * outbuf, size_t *outbytesleft)
+{
+ return libiconv(icd, inbuf, inbytesleft, outbuf, outbytesleft);
+}
+
+LIBICONV_DLL_EXPORTED int iconv_close (iconv_t icd)
+{
+ return libiconv_close(icd);
+}
#endif

View File

@ -9,11 +9,11 @@
# - GTK_PREFIX
# Formatting
fNormal="$(tput sgr0)"
fBold="$(tput bold)"
fNormal="$(tput sgr0)" >/dev/null 2>&1
fBold="$(tput bold)" >/dev/null 2>&1
# Colors depend upon the user's terminal emulator color scheme - what is readable for you may be not readable for someone else.
fMagenta="$(tput setaf 5)"
fRed="$(tput setaf 1)"
fMagenta="$(tput setaf 5)" >/dev/null 2>&1
fRed="$(tput setaf 1)" >/dev/null 2>&1
function msg {
printf "\\n${fBold}-- %s${fNormal}\\n" "${@}"
@ -120,8 +120,8 @@ minimum_macos_version=${MINIMUM_SYSTEM_VERSION}
#Out: /opt
LOCAL_PREFIX="$(cmake .. -L -N | grep LOCAL_PREFIX)"; LOCAL_PREFIX="${LOCAL_PREFIX#*=}"
#In: OSX_UNIVERSAL_URL=https:// etc.
#Out: https:// etc.
#In: OSX_UNIVERSAL_URL=file:/// etc.
#Out: file:/// etc.
UNIVERSAL_URL="$(cmake .. -L -N | grep OSX_UNIVERSAL_URL)"; UNIVERSAL_URL="${UNIVERSAL_URL#*=}"
if [[ -n $UNIVERSAL_URL ]]; then
echo "Universal app is ON. The URL is ${UNIVERSAL_URL}"
@ -135,8 +135,8 @@ EXPATLIB="$(cmake .. -LA -N | grep pkgcfg_lib_EXPAT_expat)"; pkgcfg_lib_EXPAT_ex
#Out: Developer ID Application: Doctor Who (1234567890)
CODESIGNID="$(cmake .. -L -N | grep CODESIGNID)"; CODESIGNID="${CODESIGNID#*=}"
#In: NOTARY:STRING=--username drwho@bbc.com --password abcd-efgh-hijk-lmno
#Out: --username drwho@bbc.com --password abcd-efgh-hijk-lmno
#In: NOTARY:STRING="--apple-id drwho@bbc.com --password abcd-efgh-hijk-lmno --team-id ABCDE12345"
#Out: --apple-id drwho@bbc.com --password abcd-efgh-hijk-lmno --team-id ABCDE12345
NOTARY="$(cmake .. -L -N | grep NOTARY)"; NOTARY="${NOTARY#*=}"
# In: FANCY_DMG:BOOL=ON
@ -153,6 +153,13 @@ if [[ -n $NIGHTLY ]]; then
echo "Nightly/generically-named zip is ON."
fi
# In: OSX_CONTINUOUS:BOOL=ON
# Out: ON
OSX_CONTINUOUS="$(cmake .. -L -N | grep OSX_CONTINUOUS)"; NIGHTLY="${OSX_CONTINUOUS#*=}" && CONTINUOUS="${OSX_CONTINUOUS#*=}"
if [[ -n $CONTINUOUS ]]; then
echo "Continuous/generically-named zip is ON."
fi
APP="${PROJECT_NAME}.app"
CONTENTS="${APP}/Contents"
RESOURCES="${CONTENTS}/Resources"
@ -191,15 +198,17 @@ lensfunversion=$(pkg-config --modversion lensfun | cut -f3 -d'.')
if [ $lensfunversion = 95 ]
then
ditto ${LOCAL_PREFIX}/share/lensfun/version_2/* "${RESOURCES}/share/lensfun"
# Copy liblensfun to Frameworks
ditto ${LOCAL_PREFIX}/lib/liblensfun.2.dylib "${CONTENTS}/Frameworks/liblensfun.2.dylib"
else
ditto ${LOCAL_PREFIX}/share/lensfun/version_1/* "${RESOURCES}/share/lensfun"
# Copy liblensfun to Frameworks
ditto ${LOCAL_PREFIX}/lib/liblensfun.1.dylib "${CONTENTS}/Frameworks/liblensfun.1.dylib"
fi
# Copy liblensfun to Frameworks
ditto ${LOCAL_PREFIX}/lib/liblensfun.2.dylib "${CONTENTS}/Frameworks/liblensfun.2.dylib"
# Copy libomp to Frameworks
ditto ${LOCAL_PREFIX}/lib/libomp.dylib "${CONTENTS}/Frameworks"
cp ${LOCAL_PREFIX}/lib/libomp.dylib "${CONTENTS}/Frameworks"
msg "Copying dependencies from ${GTK_PREFIX}."
CheckLink "${EXECUTABLE}" 2>&1
@ -207,24 +216,20 @@ CheckLink "${EXECUTABLE}" 2>&1
# dylib install names
ModifyInstallNames 2>&1
# Copy libjpeg-turbo ("62") into the app bundle
ditto ${LOCAL_PREFIX}/lib/libjpeg.62.dylib "${CONTENTS}/Frameworks/libjpeg.62.dylib"
## Copy libexpat into the app bundle (which is keg-only)
## if [[ -d /usr/local/Cellar/expat ]]; then ditto /usr/local/Cellar/expat/*/lib/libexpat.1.dylib "${CONTENTS}/Frameworks"; else cp "${EXPATLIB}" "${CONTENTS}/Frameworks/libexpat.1.dylib"; fi
# Copy libexpat into the app bundle (which is keg-only)
if [[ -d /usr/local/Cellar/expat ]]; then ditto /usr/local/Cellar/expat/*/lib/libexpat.1.dylib "${CONTENTS}/Frameworks"; else ditto "${EXPATLIB}" "${CONTENTS}/Frameworks/libexpat.1.dylib"; fi
## Copy libz into the app bundle
## cp ${LOCAL_PREFIX}/lib/libz.1.dylib "${CONTENTS}/Frameworks"
# Copy libz into the app bundle
ditto ${LOCAL_PREFIX}/lib/libz.1.dylib "${CONTENTS}/Frameworks"
# Copy libpng12 & 16 to the app bundle
ditto ${LOCAL_PREFIX}/lib/libpng16.16.dylib "${CONTENTS}/Frameworks/libpng16.16.dylib"
ditto ${LOCAL_PREFIX}/lib/libpng12.0.dylib "${CONTENTS}/Frameworks/libpng12.0.dylib"
# Copy libpng16 to the app bundle
cp ${LOCAL_PREFIX}/lib/libpng16.16.dylib "${CONTENTS}/Frameworks/libpng16.16.dylib"
# Copy libtiff 5 into the app bundle
ditto ${LOCAL_PREFIX}/lib/libtiff.5.dylib "${CONTENTS}/Frameworks/libtiff.5.dylib"
cp ${LOCAL_PREFIX}/lib/libtiff.5.dylib "${CONTENTS}/Frameworks/libtiff.5.dylib"
# Copy libomp to Frameworks
ditto ${LOCAL_PREFIX}/lib/libomp.dylib "${CONTENTS}/Frameworks"
cp ${LOCAL_PREFIX}/lib/libomp.dylib "${CONTENTS}/Frameworks"
# Prepare GTK+3 installation
msg "Copying configuration files from ${GTK_PREFIX}:"
@ -238,7 +243,7 @@ find -E "${LIB}" -type f -regex '.*\.(a|la|cache)$' | while read -r; do rm "${RE
# Make Frameworks folder flat
msg "Flattening the Frameworks folder"
cp -RL "${LIB}"/gdk-pixbuf-2.0/2*/loaders/* "${LIB}"
cp "${LIB}"/gtk-3.0/3*/immodules/*.{dylib,so} "${LIB}"
cp "${LIB}"/gtk-3.0/3*/immodules/*.{dylib,so} "${LIB}" >/dev/null 2>&1
rm -r "${LIB}"/gtk-3.0
rm -r "${LIB}"/gdk-pixbuf-2.0
@ -368,27 +373,7 @@ if [[ -n $NOTARY ]]; then
msg "Notarizing the application:"
ditto -c -k --sequesterRsrc --keepParent "${APP}" "${APP}.zip"
echo "Uploading..."
uuid=`xcrun altool --notarize-app --primary-bundle-id "com.rawtherapee.RawTherapee" ${NOTARY} --file "${APP}.zip" 2>&1 | grep 'RequestUUID' | awk '{ print $3 }'`
echo "Result= $uuid" # Display identifier string
sleep 15
while :
do
fullstatus=`xcrun altool --notarization-info "$uuid" ${NOTARY} 2>&1` # get the status
status1=`echo "$fullstatus" | grep 'Status\:' | awk '{ print $2 }'`
if [[ $status1 = "success" ]]; then
xcrun stapler staple *app # staple the ticket
xcrun stapler validate -v *app
echo "Notarization success"
break
elif [[ $status1 = "in" ]]; then
echo "Notarization still in progress, sleeping for 15 seconds and trying again"
sleep 15
else
echo "Notarization failed fullstatus below"
echo "$fullstatus"
exit 1
fi
done
sudo xcrun notarytool submit "${APP}.zip" ${NOTARY} --wait
fi
function CreateDmg {
@ -450,39 +435,26 @@ function CreateDmg {
msg "Notarizing the dmg:"
zip "${dmg_name}.dmg.zip" "${dmg_name}.dmg"
echo "Uploading..."
uuid=$(xcrun altool --notarize-app --primary-bundle-id "com.rawtherapee" ${NOTARY} --file "${dmg_name}.dmg.zip" 2>&1 | grep 'RequestUUID' | awk '{ print $3 }')
echo "dmg Result= ${uuid}" # Display identifier string
sleep 15
while :
do
fullstatus=`xcrun altool --notarization-info "$uuid" ${NOTARY} 2>&1` # get the status
status1=`echo "$fullstatus" | grep 'Status\:' | awk '{ print $2 }'`
if [[ $status1 = "success" ]]; then
xcrun stapler staple "${dmg_name}.dmg" # staple the ticket
xcrun stapler validate -v "${dmg_name}.dmg"
echo "dmg Notarization success"
rm *dmg.zip
break
elif [[ $status1 = "in" ]]; then
echo "dmg Notarization still in progress, sleeping for 15 seconds and trying again"
sleep 15
else
echo "dmg Notarization failed fullstatus below"
echo "$fullstatus"
exit 1
fi
done
sudo xcrun notarytool submit "${dmg_name}.dmg.zip" ${NOTARY} --wait
fi
# Zip disk image for redistribution
msg "Zipping disk image for redistribution:"
mkdir "${PROJECT_NAME}_macOS_${MINIMUM_SYSTEM_VERSION}_${arch}_${PROJECT_FULL_VERSION}_folder"
ditto {"${PROJECT_NAME}_macOS_${MINIMUM_SYSTEM_VERSION}_${arch}_${PROJECT_FULL_VERSION}.dmg","rawtherapee-cli","${PROJECT_SOURCE_DATA_DIR}/INSTALL.txt"} "${PROJECT_NAME}_macOS_${MINIMUM_SYSTEM_VERSION}_${arch}_${PROJECT_FULL_VERSION}_folder"
cp {"${PROJECT_NAME}_macOS_${MINIMUM_SYSTEM_VERSION}_${arch}_${PROJECT_FULL_VERSION}.dmg","${PROJECT_NAME}.app/Contents/Frameworks/rawtherapee-cli","${PROJECT_SOURCE_DATA_DIR}/INSTALL.readme.rtf"} "${PROJECT_NAME}_macOS_${MINIMUM_SYSTEM_VERSION}_${arch}_${PROJECT_FULL_VERSION}_folder"
zip -r "${PROJECT_NAME}_macOS_${MINIMUM_SYSTEM_VERSION}_${arch}_${PROJECT_FULL_VERSION}.zip" "${PROJECT_NAME}_macOS_${MINIMUM_SYSTEM_VERSION}_${arch}_${PROJECT_FULL_VERSION}_folder/"
if [[ -n $NIGHTLY ]]; then
cp "${PROJECT_NAME}_macOS_${MINIMUM_SYSTEM_VERSION}_${arch}_${PROJECT_FULL_VERSION}.zip" "${PROJECT_NAME}_macOS_${arch}_latest.zip"
fi
if [[ -n $CONTINUOUS ]]; then
BRANCH=$(git branch --show-current)
if test -z "${BRANCH}"; then
BRANCH=$(git rev-parse --short HEAD)
fi
mv "${PROJECT_NAME}_macOS_${arch}_latest.zip" "${PROJECT_NAME}_${BRANCH}_macOS_${CMAKE_BUILD_TYPE}.zip"
fi
}
CreateDmg
msg "Finishing build:"
echo "Script complete."