Merge pull request #5197 from Beep6581/relax-procparam-dependency
Relax dependency from `procparams.h`
This commit is contained in:
commit
17bec0a2e5
@ -17,6 +17,7 @@ The most useful feedback is based on the latest development code, and in the cas
|
|||||||
- Work in a new branch. Fork if necessary.
|
- Work in a new branch. Fork if necessary.
|
||||||
- Keep branches small so that completed and working features can be merged into the "dev" branch often, and so that they can be abandoned if they head in the wrong direction.
|
- Keep branches small so that completed and working features can be merged into the "dev" branch often, and so that they can be abandoned if they head in the wrong direction.
|
||||||
- Use C++11.
|
- Use C++11.
|
||||||
|
- To break header dependencies use forward declarations as much as possible. See [#5197](https://github.com/Beep6581/RawTherapee/pull/5197#issuecomment-468938190) for some tips.
|
||||||
- The naming isn't homogeneous throughout the code but here is a rough guideline:
|
- The naming isn't homogeneous throughout the code but here is a rough guideline:
|
||||||
- *Identifiers* (variables, functions, methods, keys, enums, etc.) should be clear and unambiguous. Make them as long as necessary to ensure that your code is understandable to others.
|
- *Identifiers* (variables, functions, methods, keys, enums, etc.) should be clear and unambiguous. Make them as long as necessary to ensure that your code is understandable to others.
|
||||||
- *Types* (classes, structs, enums, typedefs...) should be named with `UpperCamelCase`.
|
- *Types* (classes, structs, enums, typedefs...) should be named with `UpperCamelCase`.
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include "cplx_wavelet_dec.h"
|
#include "cplx_wavelet_dec.h"
|
||||||
#include "median.h"
|
#include "median.h"
|
||||||
#include "iccstore.h"
|
#include "iccstore.h"
|
||||||
|
#include "procparams.h"
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
#include <omp.h>
|
#include <omp.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include "median.h"
|
#include "median.h"
|
||||||
#include "jaggedarray.h"
|
#include "jaggedarray.h"
|
||||||
#include "StopWatch.h"
|
#include "StopWatch.h"
|
||||||
|
#include "procparams.h"
|
||||||
|
|
||||||
namespace rtengine
|
namespace rtengine
|
||||||
{
|
{
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "rtengine.h"
|
#include "rtengine.h"
|
||||||
#include "rawimagesource.h"
|
#include "rawimagesource.h"
|
||||||
#include "rt_math.h"
|
#include "rt_math.h"
|
||||||
|
#include "procparams.h"
|
||||||
#include "../rtgui/multilangmgr.h"
|
#include "../rtgui/multilangmgr.h"
|
||||||
#include "median.h"
|
#include "median.h"
|
||||||
//#define BENCHMARK
|
//#define BENCHMARK
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include "sleef.c"
|
#include "sleef.c"
|
||||||
#include "opthelper.h"
|
#include "opthelper.h"
|
||||||
#include "median.h"
|
#include "median.h"
|
||||||
|
#include "procparams.h"
|
||||||
#include "StopWatch.h"
|
#include "StopWatch.h"
|
||||||
|
|
||||||
namespace rtengine
|
namespace rtengine
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include "iccstore.h"
|
#include "iccstore.h"
|
||||||
#include "imagefloat.h"
|
#include "imagefloat.h"
|
||||||
#include "opthelper.h"
|
#include "opthelper.h"
|
||||||
|
#include "procparams.h"
|
||||||
#include "rt_math.h"
|
#include "rt_math.h"
|
||||||
#include "stdimagesource.h"
|
#include "stdimagesource.h"
|
||||||
|
|
||||||
|
@ -30,7 +30,6 @@
|
|||||||
#include "../rtgui/myflatcurve.h"
|
#include "../rtgui/myflatcurve.h"
|
||||||
#include "../rtgui/mydiagonalcurve.h"
|
#include "../rtgui/mydiagonalcurve.h"
|
||||||
#include "color.h"
|
#include "color.h"
|
||||||
#include "procparams.h"
|
|
||||||
#include "pipettebuffer.h"
|
#include "pipettebuffer.h"
|
||||||
|
|
||||||
#include "LUT.h"
|
#include "LUT.h"
|
||||||
|
@ -48,7 +48,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
struct Data;
|
struct Data;
|
||||||
|
|
||||||
std::unique_ptr<Data> data;
|
const std::unique_ptr<Data> data;
|
||||||
|
|
||||||
friend class DCPProfile;
|
friend class DCPProfile;
|
||||||
};
|
};
|
||||||
|
@ -17,9 +17,10 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "dcrop.h"
|
|
||||||
#include "curves.h"
|
#include "curves.h"
|
||||||
|
#include "dcrop.h"
|
||||||
#include "mytime.h"
|
#include "mytime.h"
|
||||||
|
#include "procparams.h"
|
||||||
#include "refreshmap.h"
|
#include "refreshmap.h"
|
||||||
#include "rt_math.h"
|
#include "rt_math.h"
|
||||||
|
|
||||||
@ -131,7 +132,7 @@ void Crop::update(int todo)
|
|||||||
{
|
{
|
||||||
MyMutex::MyLock cropLock(cropMutex);
|
MyMutex::MyLock cropLock(cropMutex);
|
||||||
|
|
||||||
ProcParams& params = parent->params;
|
ProcParams& params = *parent->params;
|
||||||
// CropGUIListener* cropgl;
|
// CropGUIListener* cropgl;
|
||||||
|
|
||||||
// No need to update todo here, since it has already been changed in ImprocCoordinator::updatePreviewImage,
|
// No need to update todo here, since it has already been changed in ImprocCoordinator::updatePreviewImage,
|
||||||
@ -1116,7 +1117,7 @@ void Crop::freeAll()
|
|||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|
||||||
bool check_need_larger_crop_for_lcp_distortion(int fw, int fh, int x, int y, int w, int h, const ProcParams ¶ms)
|
bool check_need_larger_crop_for_lcp_distortion(int fw, int fh, int x, int y, int w, int h, const procparams::ProcParams ¶ms)
|
||||||
{
|
{
|
||||||
if (x == 0 && y == 0 && w == fw && h == fh) {
|
if (x == 0 && y == 0 && w == fw && h == fh) {
|
||||||
return false;
|
return false;
|
||||||
@ -1177,7 +1178,7 @@ bool Crop::setCropSizes(int rcx, int rcy, int rcw, int rch, int skip, bool inter
|
|||||||
|
|
||||||
parent->ipf.transCoord(parent->fw, parent->fh, bx1, by1, bw, bh, orx, ory, orw, orh);
|
parent->ipf.transCoord(parent->fw, parent->fh, bx1, by1, bw, bh, orx, ory, orw, orh);
|
||||||
|
|
||||||
if (check_need_larger_crop_for_lcp_distortion(parent->fw, parent->fh, orx, ory, orw, orh, parent->params)) {
|
if (check_need_larger_crop_for_lcp_distortion(parent->fw, parent->fh, orx, ory, orw, orh, *parent->params)) {
|
||||||
// TODO - this is an estimate of the max distortion relative to the image size. ATM it is hardcoded to be 15%, which seems enough. If not, need to revise
|
// TODO - this is an estimate of the max distortion relative to the image size. ATM it is hardcoded to be 15%, which seems enough. If not, need to revise
|
||||||
int dW = int (double (parent->fw) * 0.15 / (2 * skip));
|
int dW = int (double (parent->fw) * 0.15 / (2 * skip));
|
||||||
int dH = int (double (parent->fh) * 0.15 / (2 * skip));
|
int dH = int (double (parent->fh) * 0.15 / (2 * skip));
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "rtengine.h"
|
#include "rtengine.h"
|
||||||
#include "rawimagesource.h"
|
#include "rawimagesource.h"
|
||||||
#include "rt_math.h"
|
#include "rt_math.h"
|
||||||
|
#include "procparams.h"
|
||||||
//#define BENCHMARK
|
//#define BENCHMARK
|
||||||
#include "StopWatch.h"
|
#include "StopWatch.h"
|
||||||
#include "rt_algo.h"
|
#include "rt_algo.h"
|
||||||
|
@ -31,6 +31,8 @@
|
|||||||
|
|
||||||
namespace rtengine {
|
namespace rtengine {
|
||||||
|
|
||||||
|
enum RenderingIntent : int;
|
||||||
|
|
||||||
class GamutWarning: public NonCopyable {
|
class GamutWarning: public NonCopyable {
|
||||||
public:
|
public:
|
||||||
GamutWarning(cmsHPROFILE iprof, cmsHPROFILE gamutprof, RenderingIntent intent, bool bpc);
|
GamutWarning(cmsHPROFILE iprof, cmsHPROFILE gamutprof, RenderingIntent intent, bool bpc);
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "color.h"
|
#include "color.h"
|
||||||
#include "rt_math.h"
|
#include "rt_math.h"
|
||||||
#include "iccstore.h"
|
#include "iccstore.h"
|
||||||
|
#include "procparams.h"
|
||||||
#include "../rtgui/mydiagonalcurve.h"
|
#include "../rtgui/mydiagonalcurve.h"
|
||||||
#include "improcfun.h"
|
#include "improcfun.h"
|
||||||
//#define BENCHMARK
|
//#define BENCHMARK
|
||||||
@ -248,7 +249,7 @@ void RawImageSource::getAutoMatchedToneCurve(const ColorManagementParams &cp, st
|
|||||||
&& a.dcpIlluminant == b.dcpIlluminant);
|
&& a.dcpIlluminant == b.dcpIlluminant);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!histMatchingCache.empty() && same_profile(histMatchingParams, cp)) {
|
if (!histMatchingCache.empty() && same_profile(*histMatchingParams, cp)) {
|
||||||
if (settings->verbose) {
|
if (settings->verbose) {
|
||||||
std::cout << "tone curve found in cache" << std::endl;
|
std::cout << "tone curve found in cache" << std::endl;
|
||||||
}
|
}
|
||||||
@ -286,14 +287,14 @@ void RawImageSource::getAutoMatchedToneCurve(const ColorManagementParams &cp, st
|
|||||||
std::cout << "histogram matching: no thumbnail found, generating a neutral curve" << std::endl;
|
std::cout << "histogram matching: no thumbnail found, generating a neutral curve" << std::endl;
|
||||||
}
|
}
|
||||||
histMatchingCache = outCurve;
|
histMatchingCache = outCurve;
|
||||||
histMatchingParams = cp;
|
*histMatchingParams = cp;
|
||||||
return;
|
return;
|
||||||
} else if (w * 10 < fw) {
|
} else if (w * 10 < fw) {
|
||||||
if (settings->verbose) {
|
if (settings->verbose) {
|
||||||
std::cout << "histogram matching: the embedded thumbnail is too small: " << w << "x" << h << std::endl;
|
std::cout << "histogram matching: the embedded thumbnail is too small: " << w << "x" << h << std::endl;
|
||||||
}
|
}
|
||||||
histMatchingCache = outCurve;
|
histMatchingCache = outCurve;
|
||||||
histMatchingParams = cp;
|
*histMatchingParams = cp;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
skip = LIM(skip * fh / h, 6, 10); // adjust the skip factor -- the larger the thumbnail, the less we should skip to get a good match
|
skip = LIM(skip * fh / h, 6, 10); // adjust the skip factor -- the larger the thumbnail, the less we should skip to get a good match
|
||||||
@ -316,7 +317,7 @@ void RawImageSource::getAutoMatchedToneCurve(const ColorManagementParams &cp, st
|
|||||||
std::cout << "histogram matching: raw decoding failed, generating a neutral curve" << std::endl;
|
std::cout << "histogram matching: raw decoding failed, generating a neutral curve" << std::endl;
|
||||||
}
|
}
|
||||||
histMatchingCache = outCurve;
|
histMatchingCache = outCurve;
|
||||||
histMatchingParams = cp;
|
*histMatchingParams = cp;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
target.reset(thumb->processImage(neutral, sensor_type, fh / skip, TI_Nearest, getMetaData(), scale, false, true));
|
target.reset(thumb->processImage(neutral, sensor_type, fh / skip, TI_Nearest, getMetaData(), scale, false, true));
|
||||||
@ -388,7 +389,7 @@ void RawImageSource::getAutoMatchedToneCurve(const ColorManagementParams &cp, st
|
|||||||
}
|
}
|
||||||
|
|
||||||
histMatchingCache = outCurve;
|
histMatchingCache = outCurve;
|
||||||
histMatchingParams = cp;
|
*histMatchingParams = cp;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace rtengine
|
} // namespace rtengine
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "jaggedarray.h"
|
#include "jaggedarray.h"
|
||||||
#include "rawimage.h"
|
#include "rawimage.h"
|
||||||
#include "rt_math.h"
|
#include "rt_math.h"
|
||||||
|
#include "procparams.h"
|
||||||
#include "../rtgui/multilangmgr.h"
|
#include "../rtgui/multilangmgr.h"
|
||||||
#include "opthelper.h"
|
#include "opthelper.h"
|
||||||
//#define BENCHMARK
|
//#define BENCHMARK
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
#include "iccstore.h"
|
#include "iccstore.h"
|
||||||
|
|
||||||
#include "iccmatrices.h"
|
#include "iccmatrices.h"
|
||||||
#include "procparams.h"
|
|
||||||
|
|
||||||
#include "../rtgui/options.h"
|
#include "../rtgui/options.h"
|
||||||
#include "../rtgui/threadutils.h"
|
#include "../rtgui/threadutils.h"
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "procparams.h"
|
||||||
#include "rtengine.h"
|
#include "rtengine.h"
|
||||||
|
|
||||||
const char rtengine::sImage8[] = "Image8";
|
const char rtengine::sImage8[] = "Image8";
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
#include "imagedimensions.h"
|
#include "imagedimensions.h"
|
||||||
#include "LUT.h"
|
#include "LUT.h"
|
||||||
#include "coord2d.h"
|
#include "coord2d.h"
|
||||||
#include "procparams.h"
|
|
||||||
#include "color.h"
|
#include "color.h"
|
||||||
#include "../rtgui/threadutils.h"
|
#include "../rtgui/threadutils.h"
|
||||||
|
|
||||||
@ -43,12 +42,21 @@
|
|||||||
namespace rtengine
|
namespace rtengine
|
||||||
{
|
{
|
||||||
|
|
||||||
|
namespace procparams
|
||||||
|
{
|
||||||
|
|
||||||
|
struct CoarseTransformParams;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class ProgressListener;
|
||||||
|
class Color;
|
||||||
|
|
||||||
extern const char sImage8[];
|
extern const char sImage8[];
|
||||||
extern const char sImage16[];
|
extern const char sImage16[];
|
||||||
extern const char sImagefloat[];
|
extern const char sImagefloat[];
|
||||||
int getCoarseBitMask( const procparams::CoarseTransformParams &coarse);
|
|
||||||
class ProgressListener;
|
int getCoarseBitMask(const procparams::CoarseTransformParams& coarse);
|
||||||
class Color;
|
|
||||||
|
|
||||||
enum TypeInterpolation { TI_Nearest, TI_Bilinear };
|
enum TypeInterpolation { TI_Nearest, TI_Bilinear };
|
||||||
|
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
#include "iptcpairs.h"
|
#include "iptcpairs.h"
|
||||||
#include "imagesource.h"
|
#include "imagesource.h"
|
||||||
#include "rt_math.h"
|
#include "rt_math.h"
|
||||||
|
#include "procparams.h"
|
||||||
|
|
||||||
#pragma GCC diagnostic warning "-Wextra"
|
#pragma GCC diagnostic warning "-Wextra"
|
||||||
#define PRINT_HDR_PS_DETECTION 0
|
#define PRINT_HDR_PS_DETECTION 0
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <glibmm.h>
|
#include <glibmm.h>
|
||||||
#include "../rtexif/rtexif.h"
|
#include "../rtexif/rtexif.h"
|
||||||
#include "procparams.h"
|
|
||||||
#include <libiptcdata/iptc-data.h>
|
#include <libiptcdata/iptc-data.h>
|
||||||
#include "rtengine.h"
|
#include "rtengine.h"
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "alignedbuffer.h"
|
#include "alignedbuffer.h"
|
||||||
#include "rt_math.h"
|
#include "rt_math.h"
|
||||||
#include "color.h"
|
#include "color.h"
|
||||||
|
#include "procparams.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <libiptcdata/iptc-jpeg.h>
|
#include <libiptcdata/iptc-jpeg.h>
|
||||||
#include "rt_math.h"
|
#include "rt_math.h"
|
||||||
|
#include "procparams.h"
|
||||||
#include "../rtgui/options.h"
|
#include "../rtgui/options.h"
|
||||||
#include "../rtgui/version.h"
|
#include "../rtgui/version.h"
|
||||||
|
|
||||||
@ -103,8 +104,8 @@ void ImageIO::setMetadata (const rtexif::TagDirectory* eroot, const rtengine::pr
|
|||||||
{
|
{
|
||||||
|
|
||||||
// store exif info
|
// store exif info
|
||||||
exifChange.clear();
|
exifChange->clear();
|
||||||
exifChange = exif;
|
*exifChange = exif;
|
||||||
|
|
||||||
if (exifRoot != nullptr) {
|
if (exifRoot != nullptr) {
|
||||||
delete exifRoot;
|
delete exifRoot;
|
||||||
@ -185,6 +186,22 @@ void ImageIO::setOutputProfile (const char* pdata, int plen)
|
|||||||
profileLength = plen;
|
profileLength = plen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImageIO::ImageIO() :
|
||||||
|
pl(nullptr),
|
||||||
|
embProfile(nullptr),
|
||||||
|
profileData(nullptr),
|
||||||
|
profileLength(0),
|
||||||
|
loadedProfileData(nullptr),
|
||||||
|
loadedProfileDataJpg(false),
|
||||||
|
loadedProfileLength(0),
|
||||||
|
exifChange(new procparams::ExifPairs),
|
||||||
|
iptc(nullptr),
|
||||||
|
exifRoot(nullptr),
|
||||||
|
sampleFormat(IIOSF_UNKNOWN),
|
||||||
|
sampleArrangement(IIOSA_UNKNOWN)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
ImageIO::~ImageIO ()
|
ImageIO::~ImageIO ()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -1055,7 +1072,7 @@ int ImageIO::savePNG (const Glib::ustring &fname, int bps) const
|
|||||||
iptcdata = nullptr;
|
iptcdata = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
int size = rtexif::ExifManager::createPNGMarker(exifRoot, exifChange, width, height, bps, (char*)iptcdata, iptclen, buffer, bufferSize);
|
int size = rtexif::ExifManager::createPNGMarker(exifRoot, *exifChange, width, height, bps, (char*)iptcdata, iptclen, buffer, bufferSize);
|
||||||
|
|
||||||
if (iptcdata) {
|
if (iptcdata) {
|
||||||
iptc_data_free_buf (iptc, iptcdata);
|
iptc_data_free_buf (iptc, iptcdata);
|
||||||
@ -1205,7 +1222,7 @@ int ImageIO::saveJPEG (const Glib::ustring &fname, int quality, int subSamp) con
|
|||||||
|
|
||||||
// assemble and write exif marker
|
// assemble and write exif marker
|
||||||
if (exifRoot) {
|
if (exifRoot) {
|
||||||
int size = rtexif::ExifManager::createJPEGMarker (exifRoot, exifChange, cinfo.image_width, cinfo.image_height, buffer);
|
int size = rtexif::ExifManager::createJPEGMarker (exifRoot, *exifChange, cinfo.image_width, cinfo.image_height, buffer);
|
||||||
|
|
||||||
if (size > 0 && size < 65530) {
|
if (size > 0 && size < 65530) {
|
||||||
jpeg_write_marker(&cinfo, JPEG_APP0 + 1, buffer, size);
|
jpeg_write_marker(&cinfo, JPEG_APP0 + 1, buffer, size);
|
||||||
@ -1361,7 +1378,7 @@ int ImageIO::saveTIFF (const Glib::ustring &fname, int bps, bool isFloat, bool u
|
|||||||
|
|
||||||
// ------------------ Apply list of change -----------------
|
// ------------------ Apply list of change -----------------
|
||||||
|
|
||||||
for (auto currExifChange : exifChange) {
|
for (auto currExifChange : *exifChange) {
|
||||||
cl->applyChange (currExifChange.first, currExifChange.second);
|
cl->applyChange (currExifChange.first, currExifChange.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,11 +28,12 @@
|
|||||||
#define IMIO_FILETYPENOTSUPPORTED 6
|
#define IMIO_FILETYPENOTSUPPORTED 6
|
||||||
#define IMIO_CANNOTWRITEFILE 7
|
#define IMIO_CANNOTWRITEFILE 7
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <glibmm.h>
|
#include <glibmm.h>
|
||||||
#include <libiptcdata/iptc-data.h>
|
#include <libiptcdata/iptc-data.h>
|
||||||
#include "rtengine.h"
|
#include "rtengine.h"
|
||||||
#include "imageformat.h"
|
#include "imageformat.h"
|
||||||
#include "procparams.h"
|
|
||||||
#include "../rtexif/rtexif.h"
|
#include "../rtexif/rtexif.h"
|
||||||
#include "imagedimensions.h"
|
#include "imagedimensions.h"
|
||||||
#include "iimage.h"
|
#include "iimage.h"
|
||||||
@ -55,7 +56,7 @@ protected:
|
|||||||
char* loadedProfileData;
|
char* loadedProfileData;
|
||||||
bool loadedProfileDataJpg;
|
bool loadedProfileDataJpg;
|
||||||
int loadedProfileLength;
|
int loadedProfileLength;
|
||||||
procparams::ExifPairs exifChange;
|
const std::unique_ptr<procparams::ExifPairs> exifChange;
|
||||||
IptcData* iptc;
|
IptcData* iptc;
|
||||||
const rtexif::TagDirectory* exifRoot;
|
const rtexif::TagDirectory* exifRoot;
|
||||||
MyMutex imutex;
|
MyMutex imutex;
|
||||||
@ -68,11 +69,8 @@ private:
|
|||||||
public:
|
public:
|
||||||
static Glib::ustring errorMsg[6];
|
static Glib::ustring errorMsg[6];
|
||||||
|
|
||||||
ImageIO () : pl (nullptr), embProfile(nullptr), profileData(nullptr), profileLength(0), loadedProfileData(nullptr), loadedProfileDataJpg(false),
|
ImageIO();
|
||||||
loadedProfileLength(0), iptc(nullptr), exifRoot (nullptr), sampleFormat(IIOSF_UNKNOWN),
|
~ImageIO() override;
|
||||||
sampleArrangement(IIOSA_UNKNOWN) {}
|
|
||||||
|
|
||||||
~ImageIO () override;
|
|
||||||
|
|
||||||
void setProgressListener (ProgressListener* l);
|
void setProgressListener (ProgressListener* l);
|
||||||
void setSampleFormat(IIOSampleFormat sFormat);
|
void setSampleFormat(IIOSampleFormat sFormat);
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include "rtengine.h"
|
#include "rtengine.h"
|
||||||
#include "colortemp.h"
|
#include "colortemp.h"
|
||||||
#include "procparams.h"
|
|
||||||
#include "coord2d.h"
|
#include "coord2d.h"
|
||||||
#include "dcp.h"
|
#include "dcp.h"
|
||||||
#include "LUT.h"
|
#include "LUT.h"
|
||||||
@ -35,7 +34,17 @@
|
|||||||
namespace rtengine
|
namespace rtengine
|
||||||
{
|
{
|
||||||
|
|
||||||
using namespace procparams;
|
namespace procparams
|
||||||
|
{
|
||||||
|
|
||||||
|
struct CoarseTransformParams;
|
||||||
|
struct ColorManagementParams;
|
||||||
|
struct LensProfParams;
|
||||||
|
struct RAWParams;
|
||||||
|
struct RetinexParams;
|
||||||
|
struct ToneCurveParams;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
class ImageMatrices
|
class ImageMatrices
|
||||||
{
|
{
|
||||||
@ -67,14 +76,14 @@ public:
|
|||||||
|
|
||||||
~ImageSource () override {}
|
~ImageSource () override {}
|
||||||
virtual int load (const Glib::ustring &fname) = 0;
|
virtual int load (const Glib::ustring &fname) = 0;
|
||||||
virtual void preprocess (const RAWParams &raw, const LensProfParams &lensProf, const CoarseTransformParams& coarse, bool prepareDenoise = true) {};
|
virtual void preprocess (const procparams::RAWParams &raw, const procparams::LensProfParams &lensProf, const procparams::CoarseTransformParams& coarse, bool prepareDenoise = true) {};
|
||||||
virtual void demosaic (const RAWParams &raw, bool autoContrast, double &contrastThreshold) {};
|
virtual void demosaic (const procparams::RAWParams &raw, bool autoContrast, double &contrastThreshold) {};
|
||||||
virtual void retinex (const ColorManagementParams& cmp, const RetinexParams &deh, const ToneCurveParams& Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D<float, 4> &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI) {};
|
virtual void retinex (const procparams::ColorManagementParams& cmp, const procparams::RetinexParams &deh, const procparams::ToneCurveParams& Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D<float, 4> &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI) {};
|
||||||
virtual void retinexPrepareCurves (const RetinexParams &retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, RetinexgaintransmissionCurve &retinexgaintransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI) {};
|
virtual void retinexPrepareCurves (const procparams::RetinexParams &retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, RetinexgaintransmissionCurve &retinexgaintransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI) {};
|
||||||
virtual void retinexPrepareBuffers (const ColorManagementParams& cmp, const RetinexParams &retinexParams, multi_array2D<float, 4> &conversionBuffer, LUTu &lhist16RETI) {};
|
virtual void retinexPrepareBuffers (const procparams::ColorManagementParams& cmp, const procparams::RetinexParams &retinexParams, multi_array2D<float, 4> &conversionBuffer, LUTu &lhist16RETI) {};
|
||||||
virtual void flushRawData () {};
|
virtual void flushRawData () {};
|
||||||
virtual void flushRGB () {};
|
virtual void flushRGB () {};
|
||||||
virtual void HLRecovery_Global (const ToneCurveParams &hrp) {};
|
virtual void HLRecovery_Global (const procparams::ToneCurveParams &hrp) {};
|
||||||
virtual void HLRecovery_inpaint (float** red, float** green, float** blue) {};
|
virtual void HLRecovery_inpaint (float** red, float** green, float** blue) {};
|
||||||
|
|
||||||
virtual bool isRGBSourceModified () const = 0; // tracks whether cached rgb output of demosaic has been modified
|
virtual bool isRGBSourceModified () const = 0; // tracks whether cached rgb output of demosaic has been modified
|
||||||
@ -86,7 +95,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
// use right after demosaicing image, add coarse transformation and put the result in the provided Imagefloat*
|
// use right after demosaicing image, add coarse transformation and put the result in the provided Imagefloat*
|
||||||
virtual void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const ToneCurveParams &hlp, const RAWParams &raw) = 0;
|
virtual void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const procparams::ToneCurveParams &hlp, const RAWParams &raw) = 0;
|
||||||
virtual eSensorType getSensorType () const = 0;
|
virtual eSensorType getSensorType () const = 0;
|
||||||
virtual bool isMono () const = 0;
|
virtual bool isMono () const = 0;
|
||||||
// true is ready to provide the AutoWB, i.e. when the image has been demosaiced for RawImageSource
|
// true is ready to provide the AutoWB, i.e. when the image has been demosaiced for RawImageSource
|
||||||
@ -111,7 +120,7 @@ public:
|
|||||||
|
|
||||||
virtual ImageMatrices* getImageMatrices () = 0;
|
virtual ImageMatrices* getImageMatrices () = 0;
|
||||||
virtual bool isRAW () const = 0;
|
virtual bool isRAW () const = 0;
|
||||||
virtual DCPProfile* getDCP (const ColorManagementParams &cmp, DCPProfile::ApplyState &as)
|
virtual DCPProfile* getDCP (const procparams::ColorManagementParams &cmp, DCPProfile::ApplyState &as)
|
||||||
{
|
{
|
||||||
return nullptr;
|
return nullptr;
|
||||||
};
|
};
|
||||||
@ -140,7 +149,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// for RAW files, compute a tone curve using histogram matching on the embedded thumbnail
|
// for RAW files, compute a tone curve using histogram matching on the embedded thumbnail
|
||||||
virtual void getAutoMatchedToneCurve(const ColorManagementParams &cp, std::vector<double> &outCurve)
|
virtual void getAutoMatchedToneCurve(const procparams::ColorManagementParams &cp, std::vector<double> &outCurve)
|
||||||
{
|
{
|
||||||
outCurve = { 0.0 };
|
outCurve = { 0.0 };
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -19,6 +19,8 @@
|
|||||||
#ifndef _IMPROCCOORDINATOR_H_
|
#ifndef _IMPROCCOORDINATOR_H_
|
||||||
#define _IMPROCCOORDINATOR_H_
|
#define _IMPROCCOORDINATOR_H_
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "rtengine.h"
|
#include "rtengine.h"
|
||||||
#include "improcfun.h"
|
#include "improcfun.h"
|
||||||
#include "image8.h"
|
#include "image8.h"
|
||||||
@ -70,8 +72,6 @@ protected:
|
|||||||
double lastAwbEqual;
|
double lastAwbEqual;
|
||||||
double lastAwbTempBias;
|
double lastAwbTempBias;
|
||||||
|
|
||||||
ImProcFunctions ipf;
|
|
||||||
|
|
||||||
Glib::ustring monitorProfile;
|
Glib::ustring monitorProfile;
|
||||||
RenderingIntent monitorIntent;
|
RenderingIntent monitorIntent;
|
||||||
bool softProof;
|
bool softProof;
|
||||||
@ -185,7 +185,7 @@ protected:
|
|||||||
void updatePreviewImage (int todo, bool panningRelatedChange);
|
void updatePreviewImage (int todo, bool panningRelatedChange);
|
||||||
|
|
||||||
MyMutex mProcessing;
|
MyMutex mProcessing;
|
||||||
ProcParams params;
|
const std::unique_ptr<ProcParams> params;
|
||||||
|
|
||||||
// for optimization purpose, the output profile, output rendering intent and
|
// for optimization purpose, the output profile, output rendering intent and
|
||||||
// output BPC will trigger a regeneration of the profile on parameter change only
|
// output BPC will trigger a regeneration of the profile on parameter change only
|
||||||
@ -200,7 +200,7 @@ protected:
|
|||||||
MyMutex paramsUpdateMutex;
|
MyMutex paramsUpdateMutex;
|
||||||
int changeSinceLast;
|
int changeSinceLast;
|
||||||
bool updaterRunning;
|
bool updaterRunning;
|
||||||
ProcParams nextParams;
|
const std::unique_ptr<ProcParams> nextParams;
|
||||||
bool destroying;
|
bool destroying;
|
||||||
bool utili;
|
bool utili;
|
||||||
bool autili;
|
bool autili;
|
||||||
@ -217,16 +217,16 @@ protected:
|
|||||||
bool highQualityComputed;
|
bool highQualityComputed;
|
||||||
cmsHTRANSFORM customTransformIn;
|
cmsHTRANSFORM customTransformIn;
|
||||||
cmsHTRANSFORM customTransformOut;
|
cmsHTRANSFORM customTransformOut;
|
||||||
|
|
||||||
|
ImProcFunctions ipf;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
ImProcCoordinator ();
|
ImProcCoordinator ();
|
||||||
~ImProcCoordinator () override;
|
~ImProcCoordinator () override;
|
||||||
void assign (ImageSource* imgsrc);
|
void assign (ImageSource* imgsrc);
|
||||||
|
|
||||||
void getParams (procparams::ProcParams* dst) override
|
void getParams (procparams::ProcParams* dst) override;
|
||||||
{
|
|
||||||
*dst = params;
|
|
||||||
}
|
|
||||||
|
|
||||||
void startProcessing (int changeCode) override;
|
void startProcessing (int changeCode) override;
|
||||||
ProcParams* beginUpdateParams () override;
|
ProcParams* beginUpdateParams () override;
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include "clutstore.h"
|
#include "clutstore.h"
|
||||||
#include "ciecam02.h"
|
#include "ciecam02.h"
|
||||||
#include "StopWatch.h"
|
#include "StopWatch.h"
|
||||||
|
#include "procparams.h"
|
||||||
#include "../rtgui/ppversion.h"
|
#include "../rtgui/ppversion.h"
|
||||||
#include "../rtgui/guiutils.h"
|
#include "../rtgui/guiutils.h"
|
||||||
|
|
||||||
@ -205,31 +206,31 @@ void proPhotoBlue(float *rtemp, float *gtemp, float *btemp, int istart, int tH,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void customToneCurve(const ToneCurve &customToneCurve, ToneCurveParams::TcMode curveMode, float *rtemp, float *gtemp, float *btemp, int istart, int tH, int jstart, int tW, int tileSize, PerceptualToneCurveState ptcApplyState) {
|
void customToneCurve(const ToneCurve &customToneCurve, ToneCurveMode curveMode, float *rtemp, float *gtemp, float *btemp, int istart, int tH, int jstart, int tW, int tileSize, PerceptualToneCurveState ptcApplyState) {
|
||||||
|
|
||||||
if (curveMode == ToneCurveParams::TcMode::STD) { // Standard
|
if (curveMode == ToneCurveMode::STD) { // Standard
|
||||||
const StandardToneCurve& userToneCurve = static_cast<const StandardToneCurve&> (customToneCurve);
|
const StandardToneCurve& userToneCurve = static_cast<const StandardToneCurve&> (customToneCurve);
|
||||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||||
userToneCurve.BatchApply(0, tW - jstart, &rtemp[ti * tileSize], >emp[ti * tileSize], &btemp[ti * tileSize]);
|
userToneCurve.BatchApply(0, tW - jstart, &rtemp[ti * tileSize], >emp[ti * tileSize], &btemp[ti * tileSize]);
|
||||||
}
|
}
|
||||||
} else if (curveMode == ToneCurveParams::TcMode::FILMLIKE) { // Adobe like
|
} else if (curveMode == ToneCurveMode::FILMLIKE) { // Adobe like
|
||||||
const AdobeToneCurve& userToneCurve = static_cast<const AdobeToneCurve&> (customToneCurve);
|
const AdobeToneCurve& userToneCurve = static_cast<const AdobeToneCurve&> (customToneCurve);
|
||||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||||
userToneCurve.BatchApply(0, tW - jstart, &rtemp[ti * tileSize], >emp[ti * tileSize], &btemp[ti * tileSize]);
|
userToneCurve.BatchApply(0, tW - jstart, &rtemp[ti * tileSize], >emp[ti * tileSize], &btemp[ti * tileSize]);
|
||||||
}
|
}
|
||||||
} else if (curveMode == ToneCurveParams::TcMode::SATANDVALBLENDING) { // apply the curve on the saturation and value channels
|
} else if (curveMode == ToneCurveMode::SATANDVALBLENDING) { // apply the curve on the saturation and value channels
|
||||||
const SatAndValueBlendingToneCurve& userToneCurve = static_cast<const SatAndValueBlendingToneCurve&> (customToneCurve);
|
const SatAndValueBlendingToneCurve& userToneCurve = static_cast<const SatAndValueBlendingToneCurve&> (customToneCurve);
|
||||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||||
for (int j = jstart, tj = 0; j < tW; j++, tj++) {
|
for (int j = jstart, tj = 0; j < tW; j++, tj++) {
|
||||||
userToneCurve.Apply(rtemp[ti * tileSize + tj], gtemp[ti * tileSize + tj], btemp[ti * tileSize + tj]);
|
userToneCurve.Apply(rtemp[ti * tileSize + tj], gtemp[ti * tileSize + tj], btemp[ti * tileSize + tj]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (curveMode == ToneCurveParams::TcMode::WEIGHTEDSTD) { // apply the curve to the rgb channels, weighted
|
} else if (curveMode == ToneCurveMode::WEIGHTEDSTD) { // apply the curve to the rgb channels, weighted
|
||||||
const WeightedStdToneCurve& userToneCurve = static_cast<const WeightedStdToneCurve&> (customToneCurve);
|
const WeightedStdToneCurve& userToneCurve = static_cast<const WeightedStdToneCurve&> (customToneCurve);
|
||||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||||
userToneCurve.BatchApply(0, tW - jstart, &rtemp[ti * tileSize], >emp[ti * tileSize], &btemp[ti * tileSize]);
|
userToneCurve.BatchApply(0, tW - jstart, &rtemp[ti * tileSize], >emp[ti * tileSize], &btemp[ti * tileSize]);
|
||||||
}
|
}
|
||||||
} else if (curveMode == ToneCurveParams::TcMode::LUMINANCE) { // apply the curve to the luminance channel
|
} else if (curveMode == ToneCurveMode::LUMINANCE) { // apply the curve to the luminance channel
|
||||||
const LuminanceToneCurve& userToneCurve = static_cast<const LuminanceToneCurve&> (customToneCurve);
|
const LuminanceToneCurve& userToneCurve = static_cast<const LuminanceToneCurve&> (customToneCurve);
|
||||||
|
|
||||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||||
@ -237,7 +238,7 @@ void customToneCurve(const ToneCurve &customToneCurve, ToneCurveParams::TcMode c
|
|||||||
userToneCurve.Apply(rtemp[ti * tileSize + tj], gtemp[ti * tileSize + tj], btemp[ti * tileSize + tj]);
|
userToneCurve.Apply(rtemp[ti * tileSize + tj], gtemp[ti * tileSize + tj], btemp[ti * tileSize + tj]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (curveMode == ToneCurveParams::TcMode::PERCEPTUAL) { // apply curve while keeping color appearance constant
|
} else if (curveMode == ToneCurveMode::PERCEPTUAL) { // apply curve while keeping color appearance constant
|
||||||
const PerceptualToneCurve& userToneCurve = static_cast<const PerceptualToneCurve&> (customToneCurve);
|
const PerceptualToneCurve& userToneCurve = static_cast<const PerceptualToneCurve&> (customToneCurve);
|
||||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||||
userToneCurve.BatchApply(0, tW - jstart, &rtemp[ti * tileSize], >emp[ti * tileSize], &btemp[ti * tileSize], ptcApplyState);
|
userToneCurve.BatchApply(0, tW - jstart, &rtemp[ti * tileSize], >emp[ti * tileSize], &btemp[ti * tileSize], ptcApplyState);
|
||||||
@ -320,7 +321,7 @@ void ImProcFunctions::updateColorProfiles (const Glib::ustring& monitorProfile,
|
|||||||
if (settings->printerBPC) {
|
if (settings->printerBPC) {
|
||||||
flags |= cmsFLAGS_BLACKPOINTCOMPENSATION;
|
flags |= cmsFLAGS_BLACKPOINTCOMPENSATION;
|
||||||
}
|
}
|
||||||
outIntent = settings->printerIntent;
|
outIntent = RenderingIntent(settings->printerIntent);
|
||||||
} else {
|
} else {
|
||||||
oprof = ICCStore::getInstance()->getProfile(params->icm.outputProfile);
|
oprof = ICCStore::getInstance()->getProfile(params->icm.outputProfile);
|
||||||
if (params->icm.outputBPC) {
|
if (params->icm.outputBPC) {
|
||||||
@ -2230,8 +2231,8 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
|||||||
const float hlrange = 65536.0 - shoulder;
|
const float hlrange = 65536.0 - shoulder;
|
||||||
const bool isProPhoto = (params->icm.workingProfile == "ProPhoto");
|
const bool isProPhoto = (params->icm.workingProfile == "ProPhoto");
|
||||||
// extracting datas from 'params' to avoid cache flush (to be confirmed)
|
// extracting datas from 'params' to avoid cache flush (to be confirmed)
|
||||||
ToneCurveParams::TcMode curveMode = params->toneCurve.curveMode;
|
ToneCurveMode curveMode = params->toneCurve.curveMode;
|
||||||
ToneCurveParams::TcMode curveMode2 = params->toneCurve.curveMode2;
|
ToneCurveMode curveMode2 = params->toneCurve.curveMode2;
|
||||||
bool highlight = params->toneCurve.hrenabled;//Get the value if "highlight reconstruction" is activated
|
bool highlight = params->toneCurve.hrenabled;//Get the value if "highlight reconstruction" is activated
|
||||||
bool hasToneCurve1 = bool (customToneCurve1);
|
bool hasToneCurve1 = bool (customToneCurve1);
|
||||||
bool hasToneCurve2 = bool (customToneCurve2);
|
bool hasToneCurve2 = bool (customToneCurve2);
|
||||||
@ -2243,12 +2244,12 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
|||||||
|
|
||||||
PerceptualToneCurveState ptc1ApplyState, ptc2ApplyState;
|
PerceptualToneCurveState ptc1ApplyState, ptc2ApplyState;
|
||||||
|
|
||||||
if (hasToneCurve1 && curveMode == ToneCurveParams::TcMode::PERCEPTUAL) {
|
if (hasToneCurve1 && curveMode == ToneCurveMode::PERCEPTUAL) {
|
||||||
const PerceptualToneCurve& userToneCurve = static_cast<const PerceptualToneCurve&> (customToneCurve1);
|
const PerceptualToneCurve& userToneCurve = static_cast<const PerceptualToneCurve&> (customToneCurve1);
|
||||||
userToneCurve.initApplyState (ptc1ApplyState, params->icm.workingProfile);
|
userToneCurve.initApplyState (ptc1ApplyState, params->icm.workingProfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasToneCurve2 && curveMode2 == ToneCurveParams::TcMode::PERCEPTUAL) {
|
if (hasToneCurve2 && curveMode2 == ToneCurveMode::PERCEPTUAL) {
|
||||||
const PerceptualToneCurve& userToneCurve = static_cast<const PerceptualToneCurve&> (customToneCurve2);
|
const PerceptualToneCurve& userToneCurve = static_cast<const PerceptualToneCurve&> (customToneCurve2);
|
||||||
userToneCurve.initApplyState (ptc2ApplyState, params->icm.workingProfile);
|
userToneCurve.initApplyState (ptc2ApplyState, params->icm.workingProfile);
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
#include "imagefloat.h"
|
#include "imagefloat.h"
|
||||||
#include "image16.h"
|
#include "image16.h"
|
||||||
#include "image8.h"
|
#include "image8.h"
|
||||||
#include "procparams.h"
|
|
||||||
#include "shmap.h"
|
#include "shmap.h"
|
||||||
#include "coord2d.h"
|
#include "coord2d.h"
|
||||||
#include "color.h"
|
#include "color.h"
|
||||||
@ -39,12 +38,22 @@
|
|||||||
namespace rtengine
|
namespace rtengine
|
||||||
{
|
{
|
||||||
|
|
||||||
using namespace procparams;
|
namespace procparams
|
||||||
|
{
|
||||||
|
|
||||||
|
class ProcParams;
|
||||||
|
|
||||||
|
struct DirPyrDenoiseParams;
|
||||||
|
struct SharpeningParams;
|
||||||
|
struct VignettingParams;
|
||||||
|
struct WaveletParams;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
enum RenderingIntent : int;
|
||||||
|
|
||||||
class ImProcFunctions
|
class ImProcFunctions
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
cmsHTRANSFORM monitorTransform;
|
cmsHTRANSFORM monitorTransform;
|
||||||
std::unique_ptr<GamutWarning> gamutWarning;
|
std::unique_ptr<GamutWarning> gamutWarning;
|
||||||
|
|
||||||
@ -52,7 +61,7 @@ class ImProcFunctions
|
|||||||
double scale;
|
double scale;
|
||||||
bool multiThread;
|
bool multiThread;
|
||||||
|
|
||||||
void calcVignettingParams(int oW, int oH, const VignettingParams& vignetting, double &w2, double &h2, double& maxRadius, double &v, double &b, double &mul);
|
void calcVignettingParams(int oW, int oH, const procparams::VignettingParams& vignetting, double &w2, double &h2, double& maxRadius, double &v, double &b, double &mul);
|
||||||
|
|
||||||
void transformLuminanceOnly(Imagefloat* original, Imagefloat* transformed, int cx, int cy, int oW, int oH, int fW, int fH);
|
void transformLuminanceOnly(Imagefloat* original, Imagefloat* transformed, int cx, int cy, int oW, int oH, int fW, int fH);
|
||||||
void transformGeneral(bool highQuality, Imagefloat *original, Imagefloat *transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const LensCorrection *pLCPMap);
|
void transformGeneral(bool highQuality, Imagefloat *original, Imagefloat *transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const LensCorrection *pLCPMap);
|
||||||
@ -203,7 +212,7 @@ public:
|
|||||||
bool needsTransform();
|
bool needsTransform();
|
||||||
bool needsPCVignetting();
|
bool needsPCVignetting();
|
||||||
|
|
||||||
void firstAnalysis(const Imagefloat* const working, const ProcParams ¶ms, LUTu & vhist16);
|
void firstAnalysis(const Imagefloat* const working, const procparams::ProcParams ¶ms, LUTu & vhist16);
|
||||||
void updateColorProfiles(const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck);
|
void updateColorProfiles(const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck);
|
||||||
void rgbProc(Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve,
|
void rgbProc(Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve,
|
||||||
int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2,
|
int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2,
|
||||||
@ -230,7 +239,7 @@ public:
|
|||||||
void chromiLuminanceCurve(PipetteBuffer *pipetteBuffer, int pW, LabImage* lold, LabImage* lnew, LUTf &acurve, LUTf &bcurve, LUTf & satcurve, LUTf & satclcurve, LUTf &clcurve, LUTf &curve, bool utili, bool autili, bool butili, bool ccutili, bool cclutili, bool clcutili, LUTu &histCCurve, LUTu &histLurve);
|
void chromiLuminanceCurve(PipetteBuffer *pipetteBuffer, int pW, LabImage* lold, LabImage* lnew, LUTf &acurve, LUTf &bcurve, LUTf & satcurve, LUTf & satclcurve, LUTf &clcurve, LUTf &curve, bool utili, bool autili, bool butili, bool ccutili, bool cclutili, bool clcutili, LUTu &histCCurve, LUTu &histLurve);
|
||||||
void vibrance(LabImage* lab); //Jacques' vibrance
|
void vibrance(LabImage* lab); //Jacques' vibrance
|
||||||
// void colorCurve (LabImage* lold, LabImage* lnew);
|
// void colorCurve (LabImage* lold, LabImage* lnew);
|
||||||
void sharpening(LabImage* lab, const SharpeningParams &sharpenParam, bool showMask = false);
|
void sharpening(LabImage* lab, const procparams::SharpeningParams &sharpenParam, bool showMask = false);
|
||||||
void sharpeningcam(CieImage* ncie, float** buffer, bool showMask = false);
|
void sharpeningcam(CieImage* ncie, float** buffer, bool showMask = false);
|
||||||
void transform(Imagefloat* original, Imagefloat* transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const FramesMetaData *metadata, int rawRotationDeg, bool fullImage);
|
void transform(Imagefloat* original, Imagefloat* transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const FramesMetaData *metadata, int rawRotationDeg, bool fullImage);
|
||||||
float resizeScale(const ProcParams* params, int fw, int fh, int &imw, int &imh);
|
float resizeScale(const ProcParams* params, int fw, int fh, int &imw, int &imh);
|
||||||
@ -239,7 +248,7 @@ public:
|
|||||||
void Lanczos(const LabImage* src, LabImage* dst, float scale);
|
void Lanczos(const LabImage* src, LabImage* dst, float scale);
|
||||||
void Lanczos(const Imagefloat* src, Imagefloat* dst, float scale);
|
void Lanczos(const Imagefloat* src, Imagefloat* dst, float scale);
|
||||||
|
|
||||||
void deconvsharpening(float** luminance, float** buffer, int W, int H, const SharpeningParams &sharpenParam);
|
void deconvsharpening(float** luminance, float** buffer, int W, int H, const procparams::SharpeningParams &sharpenParam);
|
||||||
void MLsharpen(LabImage* lab); // Manuel's clarity / sharpening
|
void MLsharpen(LabImage* lab); // Manuel's clarity / sharpening
|
||||||
void MLmicrocontrast(float** luminance, int W, int H); //Manuel's microcontrast
|
void MLmicrocontrast(float** luminance, int W, int H); //Manuel's microcontrast
|
||||||
void MLmicrocontrast(LabImage* lab); //Manuel's microcontrast
|
void MLmicrocontrast(LabImage* lab); //Manuel's microcontrast
|
||||||
@ -262,7 +271,7 @@ public:
|
|||||||
void EPDToneMapCIE(CieImage *ncie, float a_w, float c_, int Wid, int Hei, float minQ, float maxQ, unsigned int Iterates = 0, int skip = 1);
|
void EPDToneMapCIE(CieImage *ncie, float a_w, float c_, int Wid, int Hei, float minQ, float maxQ, unsigned int Iterates = 0, int skip = 1);
|
||||||
|
|
||||||
// pyramid denoise
|
// pyramid denoise
|
||||||
procparams::DirPyrDenoiseParams dnparams;
|
// procparams::DirPyrDenoiseParams dnparams;
|
||||||
void dirpyr(LabImage* data_fine, LabImage* data_coarse, int level, LUTf &rangefn_L, LUTf &rangefn_ab,
|
void dirpyr(LabImage* data_fine, LabImage* data_coarse, int level, LUTf &rangefn_L, LUTf &rangefn_ab,
|
||||||
int pitch, int scale, const int luma, int chroma);
|
int pitch, int scale, const int luma, int chroma);
|
||||||
void idirpyr(LabImage* data_coarse, LabImage* data_fine, int level, LUTf &rangefn_L, LUTf & nrwt_l, LUTf & nrwt_ab,
|
void idirpyr(LabImage* data_coarse, LabImage* data_fine, int level, LUTf &rangefn_L, LUTf & nrwt_l, LUTf & nrwt_ab,
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include "profilestore.h"
|
#include "profilestore.h"
|
||||||
#include "../rtgui/threadutils.h"
|
#include "../rtgui/threadutils.h"
|
||||||
#include "rtlensfun.h"
|
#include "rtlensfun.h"
|
||||||
|
#include "procparams.h"
|
||||||
|
|
||||||
namespace rtengine
|
namespace rtengine
|
||||||
{
|
{
|
||||||
|
@ -28,13 +28,15 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "improcfun.h"
|
|
||||||
#include "guidedfilter.h"
|
|
||||||
#include "rt_math.h"
|
|
||||||
#include "rt_algo.h"
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
|
|
||||||
|
#include "guidedfilter.h"
|
||||||
|
#include "improcfun.h"
|
||||||
|
#include "procparams.h"
|
||||||
|
#include "rt_algo.h"
|
||||||
|
#include "rt_math.h"
|
||||||
|
|
||||||
extern Options options;
|
extern Options options;
|
||||||
|
|
||||||
namespace rtengine {
|
namespace rtengine {
|
||||||
|
@ -26,6 +26,8 @@
|
|||||||
#include "curves.h"
|
#include "curves.h"
|
||||||
#include "alignedbuffer.h"
|
#include "alignedbuffer.h"
|
||||||
#include "color.h"
|
#include "color.h"
|
||||||
|
#include "procparams.h"
|
||||||
|
|
||||||
namespace rtengine
|
namespace rtengine
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include "improcfun.h"
|
#include "improcfun.h"
|
||||||
#include "guidedfilter.h"
|
#include "guidedfilter.h"
|
||||||
|
#include "procparams.h"
|
||||||
//#define BENCHMARK
|
//#define BENCHMARK
|
||||||
#include "StopWatch.h"
|
#include "StopWatch.h"
|
||||||
#include "sleef.c"
|
#include "sleef.c"
|
||||||
|
@ -26,9 +26,10 @@
|
|||||||
#include <omp.h>
|
#include <omp.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "improcfun.h"
|
|
||||||
#include "gauss.h"
|
|
||||||
#include "array2D.h"
|
#include "array2D.h"
|
||||||
|
#include "gauss.h"
|
||||||
|
#include "improcfun.h"
|
||||||
|
#include "procparams.h"
|
||||||
|
|
||||||
namespace rtengine {
|
namespace rtengine {
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "alignedbuffer.h"
|
#include "alignedbuffer.h"
|
||||||
#include "opthelper.h"
|
#include "opthelper.h"
|
||||||
#include "rt_math.h"
|
#include "rt_math.h"
|
||||||
|
#include "procparams.h"
|
||||||
#include "sleef.c"
|
#include "sleef.c"
|
||||||
|
|
||||||
//#define PROFILE
|
//#define PROFILE
|
||||||
|
@ -36,16 +36,18 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cstdlib>
|
|
||||||
#include <cstdio>
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <cstdio>
|
||||||
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include "rtengine.h"
|
|
||||||
#include "gauss.h"
|
#include "gauss.h"
|
||||||
#include "rawimagesource.h"
|
|
||||||
#include "improcfun.h"
|
#include "improcfun.h"
|
||||||
#include "opthelper.h"
|
|
||||||
#include "median.h"
|
#include "median.h"
|
||||||
|
#include "opthelper.h"
|
||||||
|
#include "procparams.h"
|
||||||
|
#include "rawimagesource.h"
|
||||||
|
#include "rtengine.h"
|
||||||
#include "StopWatch.h"
|
#include "StopWatch.h"
|
||||||
|
|
||||||
#define clipretinex( val, minv, maxv ) (( val = (val < minv ? minv : val ) ) > maxv ? maxv : val )
|
#define clipretinex( val, minv, maxv ) (( val = (val < minv ? minv : val ) ) > maxv ? maxv : val )
|
||||||
|
@ -19,10 +19,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "improcfun.h"
|
#include "improcfun.h"
|
||||||
|
|
||||||
#include "gauss.h"
|
#include "gauss.h"
|
||||||
#include "sleef.c"
|
|
||||||
#include "opthelper.h"
|
|
||||||
#include "guidedfilter.h"
|
#include "guidedfilter.h"
|
||||||
|
#include "opthelper.h"
|
||||||
|
#include "procparams.h"
|
||||||
|
#include "sleef.c"
|
||||||
|
|
||||||
namespace rtengine {
|
namespace rtengine {
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "bilateral2.h"
|
#include "bilateral2.h"
|
||||||
#include "jaggedarray.h"
|
#include "jaggedarray.h"
|
||||||
#include "rt_math.h"
|
#include "rt_math.h"
|
||||||
|
#include "procparams.h"
|
||||||
#include "sleef.c"
|
#include "sleef.c"
|
||||||
#include "opthelper.h"
|
#include "opthelper.h"
|
||||||
//#define BENCHMARK
|
//#define BENCHMARK
|
||||||
|
@ -24,6 +24,8 @@
|
|||||||
|
|
||||||
#include "improcfun.h"
|
#include "improcfun.h"
|
||||||
|
|
||||||
|
#include "procparams.h"
|
||||||
|
|
||||||
namespace rtengine {
|
namespace rtengine {
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "rtengine.h"
|
#include "rtengine.h"
|
||||||
#include "improcfun.h"
|
#include "improcfun.h"
|
||||||
|
#include "procparams.h"
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
#include <omp.h>
|
#include <omp.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "../rtgui/thresholdselector.h"
|
#include "../rtgui/thresholdselector.h"
|
||||||
#include "curves.h"
|
#include "curves.h"
|
||||||
#include "color.h"
|
#include "color.h"
|
||||||
|
#include "procparams.h"
|
||||||
#include "StopWatch.h"
|
#include "StopWatch.h"
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
#include <omp.h>
|
#include <omp.h>
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
#include "median.h"
|
#include "median.h"
|
||||||
#include "EdgePreservingDecomposition.h"
|
#include "EdgePreservingDecomposition.h"
|
||||||
#include "iccstore.h"
|
#include "iccstore.h"
|
||||||
|
#include "procparams.h"
|
||||||
|
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
#include <omp.h>
|
#include <omp.h>
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include "lcp.h"
|
#include "lcp.h"
|
||||||
|
|
||||||
|
#include "procparams.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
|
||||||
namespace rtengine
|
namespace rtengine
|
||||||
|
@ -18,11 +18,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "previewimage.h"
|
#include "previewimage.h"
|
||||||
|
|
||||||
#include "iimage.h"
|
#include "iimage.h"
|
||||||
#include "utils.h"
|
|
||||||
#include "iimage.h"
|
#include "iimage.h"
|
||||||
#include "rtthumbnail.h"
|
#include "procparams.h"
|
||||||
#include "rawimagesource.h"
|
#include "rawimagesource.h"
|
||||||
|
#include "rtthumbnail.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
using namespace procparams;
|
using namespace procparams;
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#define _PROCESSINGJOB_
|
#define _PROCESSINGJOB_
|
||||||
|
|
||||||
#include "rtengine.h"
|
#include "rtengine.h"
|
||||||
|
#include "procparams.h"
|
||||||
|
|
||||||
namespace rtengine
|
namespace rtengine
|
||||||
{
|
{
|
||||||
|
@ -315,8 +315,8 @@ ToneCurveParams::ToneCurveParams() :
|
|||||||
curve2{
|
curve2{
|
||||||
DCT_Linear
|
DCT_Linear
|
||||||
},
|
},
|
||||||
curveMode(ToneCurveParams::TcMode::STD),
|
curveMode(ToneCurveMode::STD),
|
||||||
curveMode2(ToneCurveParams::TcMode::STD),
|
curveMode2(ToneCurveMode::STD),
|
||||||
brightness(0),
|
brightness(0),
|
||||||
black(0),
|
black(0),
|
||||||
contrast(0),
|
contrast(0),
|
||||||
@ -2877,13 +2877,13 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
|
|||||||
saveToKeyfile(!pedited || pedited->toneCurve.hrenabled, "HLRecovery", "Enabled", toneCurve.hrenabled, keyFile);
|
saveToKeyfile(!pedited || pedited->toneCurve.hrenabled, "HLRecovery", "Enabled", toneCurve.hrenabled, keyFile);
|
||||||
saveToKeyfile(!pedited || pedited->toneCurve.method, "HLRecovery", "Method", toneCurve.method, keyFile);
|
saveToKeyfile(!pedited || pedited->toneCurve.method, "HLRecovery", "Method", toneCurve.method, keyFile);
|
||||||
|
|
||||||
const std::map<ToneCurveParams::TcMode, const char*> tc_mapping = {
|
const std::map<ToneCurveMode, const char*> tc_mapping = {
|
||||||
{ToneCurveParams::TcMode::STD, "Standard"},
|
{ToneCurveMode::STD, "Standard"},
|
||||||
{ToneCurveParams::TcMode::FILMLIKE, "FilmLike"},
|
{ToneCurveMode::FILMLIKE, "FilmLike"},
|
||||||
{ToneCurveParams::TcMode::SATANDVALBLENDING, "SatAndValueBlending"},
|
{ToneCurveMode::SATANDVALBLENDING, "SatAndValueBlending"},
|
||||||
{ToneCurveParams::TcMode::WEIGHTEDSTD, "WeightedStd"},
|
{ToneCurveMode::WEIGHTEDSTD, "WeightedStd"},
|
||||||
{ToneCurveParams::TcMode::LUMINANCE, "Luminance"},
|
{ToneCurveMode::LUMINANCE, "Luminance"},
|
||||||
{ToneCurveParams::TcMode::PERCEPTUAL, "Perceptual"}
|
{ToneCurveMode::PERCEPTUAL, "Perceptual"}
|
||||||
};
|
};
|
||||||
|
|
||||||
saveToKeyfile(!pedited || pedited->toneCurve.curveMode, "Exposure", "CurveMode", tc_mapping, toneCurve.curveMode, keyFile);
|
saveToKeyfile(!pedited || pedited->toneCurve.curveMode, "Exposure", "CurveMode", tc_mapping, toneCurve.curveMode, keyFile);
|
||||||
@ -3662,13 +3662,13 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
|
|||||||
toneCurve.shcompr = 100; // older pp3 files can have values above 100.
|
toneCurve.shcompr = 100; // older pp3 files can have values above 100.
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::map<std::string, ToneCurveParams::TcMode> tc_mapping = {
|
const std::map<std::string, ToneCurveMode> tc_mapping = {
|
||||||
{"Standard", ToneCurveParams::TcMode::STD},
|
{"Standard", ToneCurveMode::STD},
|
||||||
{"FilmLike", ToneCurveParams::TcMode::FILMLIKE},
|
{"FilmLike", ToneCurveMode::FILMLIKE},
|
||||||
{"SatAndValueBlending", ToneCurveParams::TcMode::SATANDVALBLENDING},
|
{"SatAndValueBlending", ToneCurveMode::SATANDVALBLENDING},
|
||||||
{"WeightedStd", ToneCurveParams::TcMode::WEIGHTEDSTD},
|
{"WeightedStd", ToneCurveMode::WEIGHTEDSTD},
|
||||||
{"Luminance", ToneCurveParams::TcMode::LUMINANCE},
|
{"Luminance", ToneCurveMode::LUMINANCE},
|
||||||
{"Perceptual", ToneCurveParams::TcMode::PERCEPTUAL}
|
{"Perceptual", ToneCurveMode::PERCEPTUAL}
|
||||||
};
|
};
|
||||||
|
|
||||||
assignFromKeyfile(keyFile, "Exposure", "CurveMode", pedited, tc_mapping, toneCurve.curveMode, pedited->toneCurve.curveMode);
|
assignFromKeyfile(keyFile, "Exposure", "CurveMode", pedited, tc_mapping, toneCurve.curveMode, pedited->toneCurve.curveMode);
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
#include "noncopyable.h"
|
#include "noncopyable.h"
|
||||||
|
|
||||||
class ParamsEdited;
|
struct ParamsEdited;
|
||||||
|
|
||||||
namespace rtengine
|
namespace rtengine
|
||||||
{
|
{
|
||||||
@ -44,7 +44,7 @@ class WavOpacityCurveRG;
|
|||||||
class WavOpacityCurveW;
|
class WavOpacityCurveW;
|
||||||
class WavOpacityCurveWL;
|
class WavOpacityCurveWL;
|
||||||
|
|
||||||
enum RenderingIntent {
|
enum RenderingIntent : int {
|
||||||
RI_PERCEPTUAL = INTENT_PERCEPTUAL,
|
RI_PERCEPTUAL = INTENT_PERCEPTUAL,
|
||||||
RI_RELATIVE = INTENT_RELATIVE_COLORIMETRIC,
|
RI_RELATIVE = INTENT_RELATIVE_COLORIMETRIC,
|
||||||
RI_SATURATION = INTENT_SATURATION,
|
RI_SATURATION = INTENT_SATURATION,
|
||||||
@ -249,35 +249,35 @@ private:
|
|||||||
bool is_double;
|
bool is_double;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class ToneCurveMode : int {
|
||||||
|
STD, // Standard modes, the curve is applied on all component individually
|
||||||
|
WEIGHTEDSTD, // Weighted standard mode
|
||||||
|
FILMLIKE, // Film-like mode, as defined in Adobe's reference code
|
||||||
|
SATANDVALBLENDING, // Modify the Saturation and Value channel
|
||||||
|
LUMINANCE, // Modify the Luminance channel with coefficients from Rec 709's
|
||||||
|
PERCEPTUAL // Keep color appearance constant using perceptual modeling
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters of the tone curve
|
* Parameters of the tone curve
|
||||||
*/
|
*/
|
||||||
struct ToneCurveParams {
|
struct ToneCurveParams {
|
||||||
enum class TcMode {
|
bool autoexp;
|
||||||
STD, // Standard modes, the curve is applied on all component individually
|
double clip;
|
||||||
WEIGHTEDSTD, // Weighted standard mode
|
bool hrenabled; // Highlight Reconstruction enabled
|
||||||
FILMLIKE, // Film-like mode, as defined in Adobe's reference code
|
Glib::ustring method; // Highlight Reconstruction's method
|
||||||
SATANDVALBLENDING, // Modify the Saturation and Value channel
|
double expcomp;
|
||||||
LUMINANCE, // Modify the Luminance channel with coefficients from Rec 709's
|
std::vector<double> curve;
|
||||||
PERCEPTUAL // Keep color appearance constant using perceptual modeling
|
std::vector<double> curve2;
|
||||||
};
|
ToneCurveMode curveMode;
|
||||||
|
ToneCurveMode curveMode2;
|
||||||
bool autoexp;
|
int brightness;
|
||||||
double clip;
|
int black;
|
||||||
bool hrenabled; // Highlight Reconstruction enabled
|
int contrast;
|
||||||
Glib::ustring method; // Highlight Reconstruction's method
|
int saturation;
|
||||||
double expcomp;
|
int shcompr;
|
||||||
std::vector<double> curve;
|
int hlcompr; // Highlight Recovery's compression
|
||||||
std::vector<double> curve2;
|
int hlcomprthresh; // Highlight Recovery's threshold
|
||||||
TcMode curveMode;
|
|
||||||
TcMode curveMode2;
|
|
||||||
int brightness;
|
|
||||||
int black;
|
|
||||||
int contrast;
|
|
||||||
int saturation;
|
|
||||||
int shcompr;
|
|
||||||
int hlcompr; // Highlight Recovery's compression
|
|
||||||
int hlcomprthresh; // Highlight Recovery's threshold
|
|
||||||
bool histmatching; // histogram matching
|
bool histmatching; // histogram matching
|
||||||
bool fromHistMatching;
|
bool fromHistMatching;
|
||||||
bool clampOOG; // clamp out of gamut colours
|
bool clampOOG; // clamp out of gamut colours
|
||||||
@ -1076,14 +1076,89 @@ struct MetaDataParams {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Typedef for representing a key/value for the exif metadata information
|
* Minimal wrapper allowing forward declaration for representing a key/value for the exif metadata information
|
||||||
*/
|
*/
|
||||||
typedef std::map<Glib::ustring, Glib::ustring> ExifPairs;
|
class ExifPairs final
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
using const_iterator = std::map<Glib::ustring, Glib::ustring>::const_iterator;
|
||||||
|
|
||||||
|
const_iterator begin() const
|
||||||
|
{
|
||||||
|
return pairs.begin();
|
||||||
|
}
|
||||||
|
|
||||||
|
const_iterator end() const
|
||||||
|
{
|
||||||
|
return pairs.end();
|
||||||
|
}
|
||||||
|
|
||||||
|
void clear()
|
||||||
|
{
|
||||||
|
pairs.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
Glib::ustring& operator[](const Glib::ustring& key)
|
||||||
|
{
|
||||||
|
return pairs[key];
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator ==(const ExifPairs& other) const
|
||||||
|
{
|
||||||
|
return pairs == other.pairs;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::map<Glib::ustring, Glib::ustring> pairs;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The IPTC key/value pairs
|
* The IPTC key/value pairs
|
||||||
*/
|
*/
|
||||||
typedef std::map<Glib::ustring, std::vector<Glib::ustring>> IPTCPairs;
|
class IPTCPairs final
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
using iterator = std::map<Glib::ustring, std::vector<Glib::ustring>>::iterator;
|
||||||
|
using const_iterator = std::map<Glib::ustring, std::vector<Glib::ustring>>::const_iterator;
|
||||||
|
|
||||||
|
iterator find(const Glib::ustring& key)
|
||||||
|
{
|
||||||
|
return pairs.find(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
const_iterator begin() const
|
||||||
|
{
|
||||||
|
return pairs.begin();
|
||||||
|
}
|
||||||
|
|
||||||
|
const_iterator end() const
|
||||||
|
{
|
||||||
|
return pairs.end();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool empty() const
|
||||||
|
{
|
||||||
|
return pairs.empty();
|
||||||
|
}
|
||||||
|
|
||||||
|
void clear()
|
||||||
|
{
|
||||||
|
pairs.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<Glib::ustring>& operator[](const Glib::ustring& key)
|
||||||
|
{
|
||||||
|
return pairs[key];
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator ==(const IPTCPairs& other) const
|
||||||
|
{
|
||||||
|
return pairs == other.pairs;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::map<Glib::ustring, std::vector<Glib::ustring>> pairs;
|
||||||
|
};
|
||||||
|
|
||||||
struct WaveletParams {
|
struct WaveletParams {
|
||||||
std::vector<double> ccwcurve;
|
std::vector<double> ccwcurve;
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
#include "profilestore.h"
|
#include "profilestore.h"
|
||||||
|
|
||||||
#include "dynamicprofile.h"
|
#include "dynamicprofile.h"
|
||||||
|
#include "procparams.h"
|
||||||
|
|
||||||
#include "../rtgui/options.h"
|
#include "../rtgui/options.h"
|
||||||
#include "../rtgui/multilangmgr.h"
|
#include "../rtgui/multilangmgr.h"
|
||||||
|
|
||||||
|
@ -27,8 +27,20 @@
|
|||||||
#include "noncopyable.h"
|
#include "noncopyable.h"
|
||||||
#include "dynamicprofile.h"
|
#include "dynamicprofile.h"
|
||||||
|
|
||||||
|
|
||||||
// forward decl
|
// forward decl
|
||||||
|
namespace rtengine
|
||||||
|
{
|
||||||
|
|
||||||
|
namespace procparams
|
||||||
|
{
|
||||||
|
|
||||||
|
class AutoPartialProfile;
|
||||||
|
class PartialProfile;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
class DynamicProfileRule;
|
class DynamicProfileRule;
|
||||||
class DynamicProfileRules;
|
class DynamicProfileRules;
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include "rtlensfun.h"
|
#include "rtlensfun.h"
|
||||||
#include "pdaflinesfilter.h"
|
#include "pdaflinesfilter.h"
|
||||||
#include "camconst.h"
|
#include "camconst.h"
|
||||||
|
#include "procparams.h"
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
#include <omp.h>
|
#include <omp.h>
|
||||||
#endif
|
#endif
|
||||||
@ -452,6 +453,7 @@ RawImageSource::RawImageSource ()
|
|||||||
, red(0, 0)
|
, red(0, 0)
|
||||||
, blue(0, 0)
|
, blue(0, 0)
|
||||||
, rawDirty(true)
|
, rawDirty(true)
|
||||||
|
, histMatchingParams(new procparams::ColorManagementParams)
|
||||||
{
|
{
|
||||||
camProfile = nullptr;
|
camProfile = nullptr;
|
||||||
embProfile = nullptr;
|
embProfile = nullptr;
|
||||||
|
@ -19,13 +19,16 @@
|
|||||||
#ifndef _RAWIMAGESOURCE_
|
#ifndef _RAWIMAGESOURCE_
|
||||||
#define _RAWIMAGESOURCE_
|
#define _RAWIMAGESOURCE_
|
||||||
|
|
||||||
#include "imagesource.h"
|
|
||||||
#include "dcp.h"
|
|
||||||
#include "array2D.h"
|
|
||||||
#include "curves.h"
|
|
||||||
#include "color.h"
|
|
||||||
#include "iimage.h"
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
#include "array2D.h"
|
||||||
|
#include "color.h"
|
||||||
|
#include "curves.h"
|
||||||
|
#include "dcp.h"
|
||||||
|
#include "iimage.h"
|
||||||
|
#include "imagesource.h"
|
||||||
|
|
||||||
#define HR_SCALE 2
|
#define HR_SCALE 2
|
||||||
|
|
||||||
namespace rtengine
|
namespace rtengine
|
||||||
@ -39,7 +42,7 @@ private:
|
|||||||
static DiagonalCurve *phaseOneIccCurveInv;
|
static DiagonalCurve *phaseOneIccCurveInv;
|
||||||
static LUTf invGrad; // for fast_demosaic
|
static LUTf invGrad; // for fast_demosaic
|
||||||
static LUTf initInvGrad ();
|
static LUTf initInvGrad ();
|
||||||
static void colorSpaceConversion_ (Imagefloat* im, const ColorManagementParams& cmp, const ColorTemp &wb, double pre_mul[3], cmsHPROFILE embedded, cmsHPROFILE camprofile, double cam[3][3], const std::string &camName);
|
static void colorSpaceConversion_ (Imagefloat* im, const procparams::ColorManagementParams& cmp, const ColorTemp &wb, double pre_mul[3], cmsHPROFILE embedded, cmsHPROFILE camprofile, double cam[3][3], const std::string &camName);
|
||||||
int defTransform (int tran);
|
int defTransform (int tran);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -91,7 +94,7 @@ protected:
|
|||||||
float psBlueBrightness[4];
|
float psBlueBrightness[4];
|
||||||
|
|
||||||
std::vector<double> histMatchingCache;
|
std::vector<double> histMatchingCache;
|
||||||
ColorManagementParams histMatchingParams;
|
const std::unique_ptr<procparams::ColorManagementParams> histMatchingParams;
|
||||||
|
|
||||||
void processFalseColorCorrectionThread (Imagefloat* im, array2D<float> &rbconv_Y, array2D<float> &rbconv_I, array2D<float> &rbconv_Q, array2D<float> &rbout_I, array2D<float> &rbout_Q, const int row_from, const int row_to);
|
void processFalseColorCorrectionThread (Imagefloat* im, array2D<float> &rbconv_Y, array2D<float> &rbconv_I, array2D<float> &rbconv_Q, array2D<float> &rbout_I, array2D<float> &rbout_Q, const int row_from, const int row_to);
|
||||||
void hlRecovery (const std::string &method, float* red, float* green, float* blue, int width, float* hlmax);
|
void hlRecovery (const std::string &method, float* red, float* green, float* blue, int width, float* hlmax);
|
||||||
@ -112,14 +115,14 @@ public:
|
|||||||
|
|
||||||
int load(const Glib::ustring &fname) override { return load(fname, false); }
|
int load(const Glib::ustring &fname) override { return load(fname, false); }
|
||||||
int load(const Glib::ustring &fname, bool firstFrameOnly);
|
int load(const Glib::ustring &fname, bool firstFrameOnly);
|
||||||
void preprocess (const RAWParams &raw, const LensProfParams &lensProf, const CoarseTransformParams& coarse, bool prepareDenoise = true) override;
|
void preprocess (const procparams::RAWParams &raw, const procparams::LensProfParams &lensProf, const procparams::CoarseTransformParams& coarse, bool prepareDenoise = true) override;
|
||||||
void demosaic (const RAWParams &raw, bool autoContrast, double &contrastThreshold) override;
|
void demosaic (const procparams::RAWParams &raw, bool autoContrast, double &contrastThreshold) override;
|
||||||
void retinex (const ColorManagementParams& cmp, const RetinexParams &deh, const ToneCurveParams& Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D<float, 4> &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI) override;
|
void retinex (const procparams::ColorManagementParams& cmp, const procparams::RetinexParams &deh, const procparams::ToneCurveParams& Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D<float, 4> &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI) override;
|
||||||
void retinexPrepareCurves (const RetinexParams &retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, RetinexgaintransmissionCurve &retinexgaintransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI) override;
|
void retinexPrepareCurves (const procparams::RetinexParams &retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, RetinexgaintransmissionCurve &retinexgaintransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI) override;
|
||||||
void retinexPrepareBuffers (const ColorManagementParams& cmp, const RetinexParams &retinexParams, multi_array2D<float, 4> &conversionBuffer, LUTu &lhist16RETI) override;
|
void retinexPrepareBuffers (const procparams::ColorManagementParams& cmp, const procparams::RetinexParams &retinexParams, multi_array2D<float, 4> &conversionBuffer, LUTu &lhist16RETI) override;
|
||||||
void flushRawData () override;
|
void flushRawData () override;
|
||||||
void flushRGB () override;
|
void flushRGB () override;
|
||||||
void HLRecovery_Global (const ToneCurveParams &hrp) override;
|
void HLRecovery_Global (const procparams::ToneCurveParams &hrp) override;
|
||||||
void refinement_lassus (int PassCount);
|
void refinement_lassus (int PassCount);
|
||||||
void refinement(int PassCount);
|
void refinement(int PassCount);
|
||||||
void setBorder(unsigned int rawBorder) override {border = rawBorder;}
|
void setBorder(unsigned int rawBorder) override {border = rawBorder;}
|
||||||
@ -133,7 +136,7 @@ public:
|
|||||||
void cfaboxblur (RawImage *riFlatFile, float* cfablur, int boxH, int boxW);
|
void cfaboxblur (RawImage *riFlatFile, float* cfablur, int boxH, int boxW);
|
||||||
void scaleColors (int winx, int winy, int winw, int winh, const RAWParams &raw, array2D<float> &rawData); // raw for cblack
|
void scaleColors (int winx, int winy, int winw, int winh, const RAWParams &raw, array2D<float> &rawData); // raw for cblack
|
||||||
|
|
||||||
void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const ToneCurveParams &hrp, const RAWParams &raw) override;
|
void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const procparams::ToneCurveParams &hrp, const procparams::RAWParams &raw) override;
|
||||||
eSensorType getSensorType () const override
|
eSensorType getSensorType () const override
|
||||||
{
|
{
|
||||||
return ri != nullptr ? ri->getSensorType() : ST_NONE;
|
return ri != nullptr ? ri->getSensorType() : ST_NONE;
|
||||||
@ -180,10 +183,10 @@ public:
|
|||||||
}
|
}
|
||||||
void getAutoExpHistogram (LUTu & histogram, int& histcompr) override;
|
void getAutoExpHistogram (LUTu & histogram, int& histcompr) override;
|
||||||
void getRAWHistogram (LUTu & histRedRaw, LUTu & histGreenRaw, LUTu & histBlueRaw) override;
|
void getRAWHistogram (LUTu & histRedRaw, LUTu & histGreenRaw, LUTu & histBlueRaw) override;
|
||||||
void getAutoMatchedToneCurve(const ColorManagementParams &cp, std::vector<double> &outCurve) override;
|
void getAutoMatchedToneCurve(const procparams::ColorManagementParams &cp, std::vector<double> &outCurve) override;
|
||||||
DCPProfile *getDCP(const ColorManagementParams &cmp, DCPProfile::ApplyState &as) override;
|
DCPProfile *getDCP(const procparams::ColorManagementParams &cmp, DCPProfile::ApplyState &as) override;
|
||||||
|
|
||||||
void convertColorSpace(Imagefloat* image, const ColorManagementParams &cmp, const ColorTemp &wb) override;
|
void convertColorSpace(Imagefloat* image, const procparams::ColorManagementParams &cmp, const ColorTemp &wb) override;
|
||||||
static bool findInputProfile(Glib::ustring inProfile, cmsHPROFILE embedded, std::string camName, DCPProfile **dcpProf, cmsHPROFILE& in);
|
static bool findInputProfile(Glib::ustring inProfile, cmsHPROFILE embedded, std::string camName, DCPProfile **dcpProf, cmsHPROFILE& in);
|
||||||
static void colorSpaceConversion (Imagefloat* im, const ColorManagementParams& cmp, const ColorTemp &wb, double pre_mul[3], cmsHPROFILE embedded, cmsHPROFILE camprofile, double cam[3][3], const std::string &camName)
|
static void colorSpaceConversion (Imagefloat* im, const ColorManagementParams& cmp, const ColorTemp &wb, double pre_mul[3], cmsHPROFILE embedded, cmsHPROFILE camprofile, double cam[3][3], const std::string &camName)
|
||||||
{
|
{
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include "rawimagesource.h"
|
#include "rawimagesource.h"
|
||||||
#include "rt_math.h"
|
#include "rt_math.h"
|
||||||
|
#include "procparams.h"
|
||||||
#include "../rtgui/multilangmgr.h"
|
#include "../rtgui/multilangmgr.h"
|
||||||
#include "opthelper.h"
|
#include "opthelper.h"
|
||||||
#include "StopWatch.h"
|
#include "StopWatch.h"
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
#include "imageformat.h"
|
#include "imageformat.h"
|
||||||
#include "rt_math.h"
|
#include "rt_math.h"
|
||||||
#include "procparams.h"
|
|
||||||
#include "procevents.h"
|
#include "procevents.h"
|
||||||
#include <lcms2.h>
|
#include <lcms2.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -45,6 +44,22 @@ class EditDataProvider;
|
|||||||
namespace rtengine
|
namespace rtengine
|
||||||
{
|
{
|
||||||
|
|
||||||
|
enum RenderingIntent : int;
|
||||||
|
|
||||||
|
namespace procparams
|
||||||
|
{
|
||||||
|
|
||||||
|
class ProcParams;
|
||||||
|
class IPTCPairs;
|
||||||
|
|
||||||
|
struct RAWParams;
|
||||||
|
struct ColorManagementParams;
|
||||||
|
struct CropParams;
|
||||||
|
|
||||||
|
enum class ToneCurveMode : int;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
class IImage8;
|
class IImage8;
|
||||||
class IImage16;
|
class IImage16;
|
||||||
class IImagefloat;
|
class IImagefloat;
|
||||||
@ -315,7 +330,7 @@ public:
|
|||||||
* @param hlrecons set to true if HighLight Reconstruction is enabled */
|
* @param hlrecons set to true if HighLight Reconstruction is enabled */
|
||||||
virtual void autoExpChanged(double brightness, int bright, int contrast, int black, int hlcompr, int hlcomprthresh, bool hlrecons) = 0;
|
virtual void autoExpChanged(double brightness, int bright, int contrast, int black, int hlcompr, int hlcomprthresh, bool hlrecons) = 0;
|
||||||
|
|
||||||
virtual void autoMatchedToneCurveChanged(procparams::ToneCurveParams::TcMode curveMode, const std::vector<double>& curve) = 0;
|
virtual void autoMatchedToneCurveChanged(procparams::ToneCurveMode curveMode, const std::vector<double>& curve) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class AutoCamListener
|
class AutoCamListener
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "rtlensfun.h"
|
#include "rtlensfun.h"
|
||||||
|
#include "procparams.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
@ -29,10 +29,16 @@
|
|||||||
|
|
||||||
#include "lcp.h"
|
#include "lcp.h"
|
||||||
#include "noncopyable.h"
|
#include "noncopyable.h"
|
||||||
#include "procparams.h"
|
|
||||||
|
|
||||||
namespace rtengine {
|
namespace rtengine {
|
||||||
|
|
||||||
|
namespace procparams
|
||||||
|
{
|
||||||
|
|
||||||
|
struct LensProfParams;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
class LFModifier final :
|
class LFModifier final :
|
||||||
public LensCorrection,
|
public LensCorrection,
|
||||||
public NonCopyable
|
public NonCopyable
|
||||||
@ -113,7 +119,7 @@ public:
|
|||||||
LFCamera findCamera(const Glib::ustring &make, const Glib::ustring &model) const;
|
LFCamera findCamera(const Glib::ustring &make, const Glib::ustring &model) const;
|
||||||
LFLens findLens(const LFCamera &camera, const Glib::ustring &name) const;
|
LFLens findLens(const LFCamera &camera, const Glib::ustring &name) const;
|
||||||
|
|
||||||
static std::unique_ptr<LFModifier> findModifier(const LensProfParams &lensProf, const FramesMetaData *idata, int width, int height, const CoarseTransformParams &coarse, int rawRotationDeg);
|
static std::unique_ptr<LFModifier> findModifier(const procparams::LensProfParams &lensProf, const FramesMetaData *idata, int width, int height, const CoarseTransformParams &coarse, int rawRotationDeg);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<LFModifier> getModifier(const LFCamera &camera, const LFLens &lens,
|
std::unique_ptr<LFModifier> getModifier(const LFCamera &camera, const LFLens &lens,
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include "../rtgui/ppversion.h"
|
#include "../rtgui/ppversion.h"
|
||||||
#include "improccoordinator.h"
|
#include "improccoordinator.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
#include "procparams.h"
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include "StopWatch.h"
|
#include "StopWatch.h"
|
||||||
#include "median.h"
|
#include "median.h"
|
||||||
@ -1220,7 +1221,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT
|
|||||||
|
|
||||||
ImProcFunctions ipf (¶ms, forHistogramMatching); // enable multithreading when forHistogramMatching is true
|
ImProcFunctions ipf (¶ms, forHistogramMatching); // enable multithreading when forHistogramMatching is true
|
||||||
ipf.setScale (sqrt (double (fw * fw + fh * fh)) / sqrt (double (thumbImg->getWidth() * thumbImg->getWidth() + thumbImg->getHeight() * thumbImg->getHeight()))*scale);
|
ipf.setScale (sqrt (double (fw * fw + fh * fh)) / sqrt (double (thumbImg->getWidth() * thumbImg->getWidth() + thumbImg->getHeight() * thumbImg->getHeight()))*scale);
|
||||||
ipf.updateColorProfiles (ICCStore::getInstance()->getDefaultMonitorProfileName(), options.rtSettings.monitorIntent, false, false);
|
ipf.updateColorProfiles (ICCStore::getInstance()->getDefaultMonitorProfileName(), RenderingIntent(options.rtSettings.monitorIntent), false, false);
|
||||||
|
|
||||||
LUTu hist16 (65536);
|
LUTu hist16 (65536);
|
||||||
|
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
#define _THUMBPROCESSINGPARAMETERS_
|
#define _THUMBPROCESSINGPARAMETERS_
|
||||||
|
|
||||||
#include "rawmetadatalocation.h"
|
#include "rawmetadatalocation.h"
|
||||||
#include "procparams.h"
|
|
||||||
#include <glibmm.h>
|
#include <glibmm.h>
|
||||||
#include <lcms2.h>
|
#include <lcms2.h>
|
||||||
#include "image8.h"
|
#include "image8.h"
|
||||||
|
@ -19,8 +19,6 @@
|
|||||||
#ifndef _RTSETTINGS_
|
#ifndef _RTSETTINGS_
|
||||||
#define _RTSETTINGS_
|
#define _RTSETTINGS_
|
||||||
|
|
||||||
#include "procparams.h"
|
|
||||||
|
|
||||||
namespace rtengine
|
namespace rtengine
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -39,10 +37,10 @@ public:
|
|||||||
int leveldnautsimpl; // STD or EXPERT
|
int leveldnautsimpl; // STD or EXPERT
|
||||||
|
|
||||||
Glib::ustring printerProfile; ///< ICC profile name used for soft-proofing a printer output
|
Glib::ustring printerProfile; ///< ICC profile name used for soft-proofing a printer output
|
||||||
RenderingIntent printerIntent; ///< Colorimetric intent used with the above profile
|
int printerIntent; ///< Colorimetric intent used with the above profile
|
||||||
bool printerBPC; ///< Black Point Compensation for the Labimage->Printer->Monitor transform
|
bool printerBPC; ///< Black Point Compensation for the Labimage->Printer->Monitor transform
|
||||||
Glib::ustring monitorProfile; ///< ICC profile name used for the monitor
|
Glib::ustring monitorProfile; ///< ICC profile name used for the monitor
|
||||||
RenderingIntent monitorIntent; ///< Colorimetric intent used with the above profile
|
int monitorIntent; ///< Colorimetric intent used with the above profile
|
||||||
bool monitorBPC; ///< Black Point Compensation for the Labimage->Monitor transform (directly, i.e. not soft-proofing and no WCS in between)
|
bool monitorBPC; ///< Black Point Compensation for the Labimage->Monitor transform (directly, i.e. not soft-proofing and no WCS in between)
|
||||||
bool autoMonitorProfile; ///< Try to auto-determine the correct monitor color profile
|
bool autoMonitorProfile; ///< Try to auto-determine the correct monitor color profile
|
||||||
bool autocielab;
|
bool autocielab;
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "iccstore.h"
|
#include "iccstore.h"
|
||||||
#include "clutstore.h"
|
#include "clutstore.h"
|
||||||
#include "processingjob.h"
|
#include "processingjob.h"
|
||||||
|
#include "procparams.h"
|
||||||
#include <glibmm.h>
|
#include <glibmm.h>
|
||||||
#include "../rtgui/options.h"
|
#include "../rtgui/options.h"
|
||||||
#include "rawimagesource.h"
|
#include "rawimagesource.h"
|
||||||
@ -770,7 +771,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
params.toneCurve.autoexp = false;
|
params.toneCurve.autoexp = false;
|
||||||
params.toneCurve.curveMode = ToneCurveParams::TcMode::FILMLIKE;
|
params.toneCurve.curveMode = ToneCurveMode::FILMLIKE;
|
||||||
params.toneCurve.curve2 = { 0 };
|
params.toneCurve.curve2 = { 0 };
|
||||||
params.toneCurve.brightness = 0;
|
params.toneCurve.brightness = 0;
|
||||||
params.toneCurve.contrast = 0;
|
params.toneCurve.contrast = 0;
|
||||||
|
@ -17,11 +17,13 @@
|
|||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "stdimagesource.h"
|
#include "stdimagesource.h"
|
||||||
#include "mytime.h"
|
|
||||||
|
#include "color.h"
|
||||||
|
#include "curves.h"
|
||||||
#include "iccstore.h"
|
#include "iccstore.h"
|
||||||
#include "imageio.h"
|
#include "imageio.h"
|
||||||
#include "curves.h"
|
#include "mytime.h"
|
||||||
#include "color.h"
|
#include "procparams.h"
|
||||||
|
|
||||||
#undef THREAD_PRIORITY_NORMAL
|
#undef THREAD_PRIORITY_NORMAL
|
||||||
|
|
||||||
|
@ -74,6 +74,7 @@
|
|||||||
#include "opthelper.h"
|
#include "opthelper.h"
|
||||||
#include "rt_algo.h"
|
#include "rt_algo.h"
|
||||||
#include "rescale.h"
|
#include "rescale.h"
|
||||||
|
#include "procparams.h"
|
||||||
|
|
||||||
namespace rtengine
|
namespace rtengine
|
||||||
{
|
{
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include "rtengine.h"
|
#include "rtengine.h"
|
||||||
#include "rawimagesource.h"
|
#include "rawimagesource.h"
|
||||||
|
#include "procparams.h"
|
||||||
#include "../rtgui/multilangmgr.h"
|
#include "../rtgui/multilangmgr.h"
|
||||||
//#define BENCHMARK
|
//#define BENCHMARK
|
||||||
#include "StopWatch.h"
|
#include "StopWatch.h"
|
||||||
|
@ -32,6 +32,8 @@
|
|||||||
|
|
||||||
#include "rtexif.h"
|
#include "rtexif.h"
|
||||||
|
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
#include "../rtgui/cacheimagedata.h"
|
#include "../rtgui/cacheimagedata.h"
|
||||||
#include "../rtgui/version.h"
|
#include "../rtgui/version.h"
|
||||||
#include "../rtgui/ppversion.h"
|
#include "../rtgui/ppversion.h"
|
||||||
|
@ -32,10 +32,19 @@
|
|||||||
|
|
||||||
#include <glibmm.h>
|
#include <glibmm.h>
|
||||||
|
|
||||||
#include "../rtengine/procparams.h"
|
|
||||||
#include "../rtengine/noncopyable.h"
|
#include "../rtengine/noncopyable.h"
|
||||||
#include "../rtengine/rawmetadatalocation.h"
|
#include "../rtengine/rawmetadatalocation.h"
|
||||||
|
|
||||||
|
namespace rtengine
|
||||||
|
{
|
||||||
|
|
||||||
|
namespace procparams
|
||||||
|
{
|
||||||
|
class ExifPairs;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
class CacheImageData;
|
class CacheImageData;
|
||||||
|
|
||||||
namespace rtexif
|
namespace rtexif
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include "../rtengine/rt_math.h"
|
#include "../rtengine/rt_math.h"
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
@ -197,7 +198,7 @@ void BatchQueue::addEntries (const std::vector<BatchQueueEntry*>& entries, bool
|
|||||||
// recovery save
|
// recovery save
|
||||||
const auto tempFile = getTempFilenameForParams (entry->filename);
|
const auto tempFile = getTempFilenameForParams (entry->filename);
|
||||||
|
|
||||||
if (!entry->params.save (tempFile))
|
if (!entry->params->save (tempFile))
|
||||||
entry->savedParamsFile = tempFile;
|
entry->savedParamsFile = tempFile;
|
||||||
|
|
||||||
entry->selected = false;
|
entry->selected = false;
|
||||||
@ -642,7 +643,7 @@ void BatchQueue::error(const Glib::ustring& descr)
|
|||||||
bqbs->setButtonListener (this);
|
bqbs->setButtonListener (this);
|
||||||
processing->addButtonSet (bqbs);
|
processing->addButtonSet (bqbs);
|
||||||
processing->processing = false;
|
processing->processing = false;
|
||||||
processing->job = rtengine::ProcessingJob::create(processing->filename, processing->thumbnail->getType() == FT_Raw, processing->params);
|
processing->job = rtengine::ProcessingJob::create(processing->filename, processing->thumbnail->getType() == FT_Raw, *processing->params);
|
||||||
processing = nullptr;
|
processing = nullptr;
|
||||||
redraw ();
|
redraw ();
|
||||||
}
|
}
|
||||||
@ -706,7 +707,7 @@ rtengine::ProcessingJob* BatchQueue::imageReady(rtengine::IImagefloat* img)
|
|||||||
// We keep the extension to avoid overwriting the profile when we have
|
// We keep the extension to avoid overwriting the profile when we have
|
||||||
// the same output filename with different extension
|
// the same output filename with different extension
|
||||||
//processing->params.save (removeExtension(fname) + paramFileExtension);
|
//processing->params.save (removeExtension(fname) + paramFileExtension);
|
||||||
processing->params.save (fname + ".out" + paramFileExtension);
|
processing->params->save (fname + ".out" + paramFileExtension);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (processing->thumbnail) {
|
if (processing->thumbnail) {
|
||||||
|
@ -26,6 +26,8 @@
|
|||||||
#include "multilangmgr.h"
|
#include "multilangmgr.h"
|
||||||
#include "thumbbrowserbase.h"
|
#include "thumbbrowserbase.h"
|
||||||
|
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
bool BatchQueueEntry::iconsLoaded(false);
|
bool BatchQueueEntry::iconsLoaded(false);
|
||||||
Glib::RefPtr<Gdk::Pixbuf> BatchQueueEntry::savedAsIcon;
|
Glib::RefPtr<Gdk::Pixbuf> BatchQueueEntry::savedAsIcon;
|
||||||
|
|
||||||
@ -36,7 +38,7 @@ BatchQueueEntry::BatchQueueEntry (rtengine::ProcessingJob* pjob, const rtengine:
|
|||||||
origph(prevh),
|
origph(prevh),
|
||||||
opreviewDone(false),
|
opreviewDone(false),
|
||||||
job(pjob),
|
job(pjob),
|
||||||
params(pparams),
|
params(new rtengine::procparams::ProcParams(pparams)),
|
||||||
progress(0),
|
progress(0),
|
||||||
outFileName(""),
|
outFileName(""),
|
||||||
sequence(0),
|
sequence(0),
|
||||||
@ -93,7 +95,7 @@ void BatchQueueEntry::refreshThumbnailImage ()
|
|||||||
// creating the image buffer first
|
// creating the image buffer first
|
||||||
//if (!opreview) opreview = new guint8[(origpw+1) * origph * 3];
|
//if (!opreview) opreview = new guint8[(origpw+1) * origph * 3];
|
||||||
// this will asynchronously compute the original preview and land at this.updateImage
|
// this will asynchronously compute the original preview and land at this.updateImage
|
||||||
batchQueueEntryUpdater.process (nullptr, origpw, origph, preh, this, ¶ms, thumbnail);
|
batchQueueEntryUpdater.process (nullptr, origpw, origph, preh, this, params.get(), thumbnail);
|
||||||
} else {
|
} else {
|
||||||
// this will asynchronously land at this.updateImage
|
// this will asynchronously land at this.updateImage
|
||||||
batchQueueEntryUpdater.process (opreview, origpw, origph, preh, this);
|
batchQueueEntryUpdater.process (opreview, origpw, origph, preh, this);
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
#ifndef _BATCHQUEUEENTRY_
|
#ifndef _BATCHQUEUEENTRY_
|
||||||
#define _BATCHQUEUEENTRY_
|
#define _BATCHQUEUEENTRY_
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
#include "../rtengine/rtengine.h"
|
#include "../rtengine/rtengine.h"
|
||||||
#include "thumbbrowserentrybase.h"
|
#include "thumbbrowserentrybase.h"
|
||||||
@ -46,7 +48,7 @@ public:
|
|||||||
static Glib::RefPtr<Gdk::Pixbuf> savedAsIcon;
|
static Glib::RefPtr<Gdk::Pixbuf> savedAsIcon;
|
||||||
|
|
||||||
rtengine::ProcessingJob* job;
|
rtengine::ProcessingJob* job;
|
||||||
rtengine::procparams::ProcParams params;
|
const std::unique_ptr<rtengine::procparams::ProcParams> params;
|
||||||
Glib::ustring savedParamsFile;
|
Glib::ustring savedParamsFile;
|
||||||
double progress;
|
double progress;
|
||||||
Glib::ustring outFileName;
|
Glib::ustring outFileName;
|
||||||
|
@ -16,11 +16,14 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "bayerpreprocess.h"
|
|
||||||
#include "guiutils.h"
|
|
||||||
#include "eventmapper.h"
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
#include "bayerpreprocess.h"
|
||||||
|
#include "eventmapper.h"
|
||||||
|
#include "guiutils.h"
|
||||||
|
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
|
|
||||||
|
@ -17,9 +17,13 @@
|
|||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "bayerprocess.h"
|
#include "bayerprocess.h"
|
||||||
|
|
||||||
#include "eventmapper.h"
|
#include "eventmapper.h"
|
||||||
#include "options.h"
|
|
||||||
#include "guiutils.h"
|
#include "guiutils.h"
|
||||||
|
#include "options.h"
|
||||||
|
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
|
|
||||||
|
@ -17,8 +17,11 @@
|
|||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "bayerrawexposure.h"
|
#include "bayerrawexposure.h"
|
||||||
|
|
||||||
#include "guiutils.h"
|
#include "guiutils.h"
|
||||||
|
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
|
|
||||||
|
@ -16,13 +16,17 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "blackwhite.h"
|
|
||||||
#include "rtimage.h"
|
|
||||||
#include "../rtengine/color.h"
|
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include "guiutils.h"
|
|
||||||
|
#include "blackwhite.h"
|
||||||
|
|
||||||
#include "edit.h"
|
#include "edit.h"
|
||||||
|
#include "guiutils.h"
|
||||||
|
#include "rtimage.h"
|
||||||
|
|
||||||
|
#include "../rtengine/color.h"
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
|
@ -22,6 +22,8 @@
|
|||||||
#include "version.h"
|
#include "version.h"
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
CacheImageData::CacheImageData ()
|
CacheImageData::CacheImageData ()
|
||||||
: md5(""), supported(false), format(FT_Invalid), rankOld(-1), inTrashOld(false), recentlySaved(false),
|
: md5(""), supported(false), format(FT_Invalid), rankOld(-1), inTrashOld(false), recentlySaved(false),
|
||||||
timeValid(false), year(0), month(0), day(0), hour(0), min(0), sec(0), exifValid(false), frameCount(1),
|
timeValid(false), year(0), month(0), day(0), hour(0), min(0), sec(0), exifValid(false), frameCount(1),
|
||||||
@ -301,3 +303,7 @@ int CacheImageData::save (const Glib::ustring& fname)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rtengine::procparams::IPTCPairs CacheImageData::getIPTCData(unsigned int frame) const
|
||||||
|
{
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
@ -94,7 +94,7 @@ public:
|
|||||||
rtexif::TagDirectory* getFrameExifData (unsigned int frame = 0) const override { return nullptr; }
|
rtexif::TagDirectory* getFrameExifData (unsigned int frame = 0) const override { return nullptr; }
|
||||||
rtexif::TagDirectory* getBestExifData (rtengine::ImageSource *imgSource, rtengine::procparams::RAWParams *rawParams) const override { return nullptr; }
|
rtexif::TagDirectory* getBestExifData (rtengine::ImageSource *imgSource, rtengine::procparams::RAWParams *rawParams) const override { return nullptr; }
|
||||||
bool hasIPTC (unsigned int frame = 0) const override { return false; }
|
bool hasIPTC (unsigned int frame = 0) const override { return false; }
|
||||||
rtengine::procparams::IPTCPairs getIPTCData (unsigned int frame = 0) const override { return rtengine::procparams::IPTCPairs(); }
|
rtengine::procparams::IPTCPairs getIPTCData (unsigned int frame = 0) const override;
|
||||||
tm getDateTime (unsigned int frame = 0) const override { return tm{}; }
|
tm getDateTime (unsigned int frame = 0) const override { return tm{}; }
|
||||||
time_t getDateTimeAsTS(unsigned int frame = 0) const override { return time_t(-1); }
|
time_t getDateTimeAsTS(unsigned int frame = 0) const override { return time_t(-1); }
|
||||||
int getISOSpeed (unsigned int frame = 0) const override { return iso; }
|
int getISOSpeed (unsigned int frame = 0) const override { return iso; }
|
||||||
|
@ -16,10 +16,14 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "cacorrection.h"
|
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|
||||||
|
#include "cacorrection.h"
|
||||||
|
|
||||||
#include "rtimage.h"
|
#include "rtimage.h"
|
||||||
|
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
|
|
||||||
|
@ -17,8 +17,11 @@
|
|||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "chmixer.h"
|
#include "chmixer.h"
|
||||||
|
|
||||||
#include "rtimage.h"
|
#include "rtimage.h"
|
||||||
|
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
|
|
||||||
|
@ -18,62 +18,146 @@
|
|||||||
*/
|
*/
|
||||||
#include "clipboard.h"
|
#include "clipboard.h"
|
||||||
|
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
Clipboard clipboard;
|
Clipboard clipboard;
|
||||||
|
|
||||||
Clipboard::Clipboard () : _hasIPTC(false), partProfile (false), hasDiagonalCurveDataType(DCT_Empty), hasFlatCurveDataType(FCT_Empty) {}
|
Clipboard::Clipboard () :
|
||||||
|
_hasIPTC(false),
|
||||||
|
iptc(new rtengine::procparams::IPTCPairs),
|
||||||
|
partProfile(new rtengine::procparams::PartialProfile(false)),
|
||||||
|
hasDiagonalCurveDataType(DCT_Empty),
|
||||||
|
hasFlatCurveDataType(FCT_Empty)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
Clipboard::~Clipboard ()
|
Clipboard::~Clipboard ()
|
||||||
{
|
{
|
||||||
partProfile.deleteInstance();
|
partProfile->deleteInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Clipboard::hasIPTC() const
|
||||||
|
{
|
||||||
|
return _hasIPTC;
|
||||||
|
}
|
||||||
|
|
||||||
|
const rtengine::procparams::IPTCPairs& Clipboard::getIPTC() const
|
||||||
|
{
|
||||||
|
return *iptc;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Clipboard::setIPTC(const rtengine::procparams::IPTCPairs& iptcc)
|
||||||
|
{
|
||||||
|
*iptc = iptcc;
|
||||||
|
_hasIPTC = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
const rtengine::procparams::PartialProfile& Clipboard::getPartialProfile() const
|
||||||
|
{
|
||||||
|
return *partProfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* set both the "pparams" and "pedited" field of the PartialProfile; each one can be NULL
|
* set both the "pparams" and "pedited" field of the PartialProfile; each one can be NULL
|
||||||
*/
|
*/
|
||||||
void Clipboard::setPartialProfile (const rtengine::procparams::PartialProfile& pprofile)
|
void Clipboard::setPartialProfile(const rtengine::procparams::PartialProfile& pprofile)
|
||||||
{
|
{
|
||||||
if (pprofile.pparams) {
|
if (pprofile.pparams) {
|
||||||
if (!partProfile.pparams) {
|
if (!partProfile->pparams) {
|
||||||
partProfile.pparams = new rtengine::procparams::ProcParams();
|
partProfile->pparams = new rtengine::procparams::ProcParams();
|
||||||
}
|
}
|
||||||
|
|
||||||
*partProfile.pparams = *pprofile.pparams;
|
*partProfile->pparams = *pprofile.pparams;
|
||||||
} else {
|
} else {
|
||||||
if (partProfile.pparams) {
|
if (partProfile->pparams) {
|
||||||
delete partProfile.pparams;
|
delete partProfile->pparams;
|
||||||
partProfile.pparams = nullptr;
|
partProfile->pparams = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pprofile.pedited) {
|
if (pprofile.pedited) {
|
||||||
if (!partProfile.pedited) {
|
if (!partProfile->pedited) {
|
||||||
partProfile.pedited = new ParamsEdited();
|
partProfile->pedited = new ParamsEdited();
|
||||||
}
|
}
|
||||||
|
|
||||||
*partProfile.pedited = *pprofile.pedited;
|
*partProfile->pedited = *pprofile.pedited;
|
||||||
} else {
|
} else {
|
||||||
if (partProfile.pedited) {
|
if (partProfile->pedited) {
|
||||||
delete partProfile.pedited;
|
delete partProfile->pedited;
|
||||||
partProfile.pedited = nullptr;
|
partProfile->pedited = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const rtengine::procparams::ProcParams& Clipboard::getProcParams() const
|
||||||
|
{
|
||||||
|
return *partProfile->pparams;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* this method copy the procparams to "pparams" and delete "pedited"
|
* this method copy the procparams to "pparams" and delete "pedited"
|
||||||
*/
|
*/
|
||||||
void Clipboard::setProcParams (const rtengine::procparams::ProcParams& pparams)
|
void Clipboard::setProcParams(const rtengine::procparams::ProcParams& pparams)
|
||||||
{
|
{
|
||||||
// copy procparams
|
// copy procparams
|
||||||
if (!partProfile.pparams) {
|
if (!partProfile->pparams) {
|
||||||
partProfile.pparams = new rtengine::procparams::ProcParams();
|
partProfile->pparams = new rtengine::procparams::ProcParams();
|
||||||
}
|
}
|
||||||
|
|
||||||
*partProfile.pparams = pparams;
|
*partProfile->pparams = pparams;
|
||||||
|
|
||||||
// delete pedited
|
// delete pedited
|
||||||
if (partProfile.pedited) {
|
if (partProfile->pedited) {
|
||||||
delete partProfile.pedited;
|
delete partProfile->pedited;
|
||||||
partProfile.pedited = nullptr;
|
partProfile->pedited = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const ParamsEdited& Clipboard::getParamsEdited() const
|
||||||
|
{
|
||||||
|
return *partProfile->pedited;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Clipboard::hasProcParams() const
|
||||||
|
{
|
||||||
|
return partProfile->pparams;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Clipboard::hasPEdited() const
|
||||||
|
{
|
||||||
|
return partProfile->pedited;
|
||||||
|
}
|
||||||
|
|
||||||
|
DiagonalCurveType Clipboard::hasDiagonalCurveData() const
|
||||||
|
{
|
||||||
|
return hasDiagonalCurveDataType;
|
||||||
|
}
|
||||||
|
|
||||||
|
const std::vector<double>& Clipboard::getDiagonalCurveData() const
|
||||||
|
{
|
||||||
|
return diagonalCurve;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Clipboard::setDiagonalCurveData(const std::vector<double>& p, DiagonalCurveType type)
|
||||||
|
{
|
||||||
|
diagonalCurve = p;
|
||||||
|
hasDiagonalCurveDataType = type;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
FlatCurveType Clipboard::hasFlatCurveData() const
|
||||||
|
{
|
||||||
|
return hasFlatCurveDataType;
|
||||||
|
}
|
||||||
|
|
||||||
|
const std::vector<double>& Clipboard:: getFlatCurveData() const
|
||||||
|
{
|
||||||
|
return flatCurve;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Clipboard::setFlatCurveData(const std::vector<double>& p, FlatCurveType type)
|
||||||
|
{
|
||||||
|
flatCurve = p;
|
||||||
|
hasFlatCurveDataType = type;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
@ -19,96 +19,64 @@
|
|||||||
#ifndef _CLIPBOARD_
|
#ifndef _CLIPBOARD_
|
||||||
#define _CLIPBOARD_
|
#define _CLIPBOARD_
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "../rtengine/rtengine.h"
|
|
||||||
#include "../rtengine/procparams.h"
|
|
||||||
#include "paramsedited.h"
|
|
||||||
#include "myflatcurve.h"
|
|
||||||
#include "mydiagonalcurve.h"
|
#include "mydiagonalcurve.h"
|
||||||
|
#include "myflatcurve.h"
|
||||||
|
#include "paramsedited.h"
|
||||||
|
|
||||||
|
#include "../rtengine/rtengine.h"
|
||||||
|
|
||||||
|
namespace rtengine
|
||||||
|
{
|
||||||
|
|
||||||
|
namespace procparams
|
||||||
|
{
|
||||||
|
|
||||||
|
class PartialProfile;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
class Clipboard
|
class Clipboard
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
Clipboard ();
|
||||||
|
~Clipboard ();
|
||||||
|
|
||||||
|
bool hasIPTC() const;
|
||||||
|
const rtengine::procparams::IPTCPairs& getIPTC() const;
|
||||||
|
void setIPTC(const rtengine::procparams::IPTCPairs& iptcc);
|
||||||
|
|
||||||
|
const rtengine::procparams::PartialProfile& getPartialProfile() const;
|
||||||
|
void setPartialProfile(const rtengine::procparams::PartialProfile& pprofile);
|
||||||
|
|
||||||
|
const rtengine::procparams::ProcParams& getProcParams() const;
|
||||||
|
void setProcParams(const rtengine::procparams::ProcParams& pparams);
|
||||||
|
|
||||||
|
const ParamsEdited& getParamsEdited() const;
|
||||||
|
|
||||||
|
bool hasProcParams() const;
|
||||||
|
bool hasPEdited() const;
|
||||||
|
|
||||||
|
DiagonalCurveType hasDiagonalCurveData() const;
|
||||||
|
const std::vector<double>& getDiagonalCurveData() const;
|
||||||
|
void setDiagonalCurveData(const std::vector<double>& p, DiagonalCurveType type);
|
||||||
|
|
||||||
|
void setFlatCurveData(const std::vector<double>& p, FlatCurveType type);
|
||||||
|
const std::vector<double>& getFlatCurveData() const;
|
||||||
|
FlatCurveType hasFlatCurveData() const;
|
||||||
|
|
||||||
|
private:
|
||||||
bool _hasIPTC;
|
bool _hasIPTC;
|
||||||
rtengine::procparams::IPTCPairs iptc;
|
const std::unique_ptr<rtengine::procparams::IPTCPairs> iptc;
|
||||||
rtengine::procparams::PartialProfile partProfile;
|
const std::unique_ptr<rtengine::procparams::PartialProfile> partProfile;
|
||||||
DiagonalCurveType hasDiagonalCurveDataType;
|
DiagonalCurveType hasDiagonalCurveDataType;
|
||||||
FlatCurveType hasFlatCurveDataType;
|
FlatCurveType hasFlatCurveDataType;
|
||||||
std::vector<double> diagonalCurve;
|
std::vector<double> diagonalCurve;
|
||||||
std::vector<double> flatCurve;
|
std::vector<double> flatCurve;
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
void setIPTC (const rtengine::procparams::IPTCPairs& iptcc)
|
|
||||||
{
|
|
||||||
iptc = iptcc;
|
|
||||||
_hasIPTC = true;
|
|
||||||
}
|
|
||||||
const rtengine::procparams::IPTCPairs& getIPTC ()
|
|
||||||
{
|
|
||||||
return iptc;
|
|
||||||
}
|
|
||||||
bool hasIPTC ()
|
|
||||||
{
|
|
||||||
return _hasIPTC;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setPartialProfile (const rtengine::procparams::PartialProfile& pprofile);
|
|
||||||
const rtengine::procparams::PartialProfile& getPartialProfile ()
|
|
||||||
{
|
|
||||||
return partProfile;
|
|
||||||
};
|
|
||||||
void setProcParams (const rtengine::procparams::ProcParams& pparams);
|
|
||||||
const rtengine::procparams::ProcParams& getProcParams ()
|
|
||||||
{
|
|
||||||
return *partProfile.pparams;
|
|
||||||
}
|
|
||||||
const ParamsEdited& getParamsEdited ()
|
|
||||||
{
|
|
||||||
return *partProfile.pedited;
|
|
||||||
}
|
|
||||||
bool hasProcParams ()
|
|
||||||
{
|
|
||||||
return partProfile.pparams;
|
|
||||||
}
|
|
||||||
bool hasPEdited ()
|
|
||||||
{
|
|
||||||
return partProfile.pedited;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setDiagonalCurveData (std::vector<double>& p, DiagonalCurveType type )
|
|
||||||
{
|
|
||||||
diagonalCurve = p;
|
|
||||||
hasDiagonalCurveDataType = type;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const std::vector<double> & getDiagonalCurveData ()
|
|
||||||
{
|
|
||||||
return diagonalCurve;
|
|
||||||
}
|
|
||||||
DiagonalCurveType hasDiagonalCurveData ()
|
|
||||||
{
|
|
||||||
return hasDiagonalCurveDataType;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setFlatCurveData (std::vector<double>& p, FlatCurveType type )
|
|
||||||
{
|
|
||||||
flatCurve = p;
|
|
||||||
hasFlatCurveDataType = type;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const std::vector<double> & getFlatCurveData ()
|
|
||||||
{
|
|
||||||
return flatCurve;
|
|
||||||
}
|
|
||||||
FlatCurveType hasFlatCurveData ()
|
|
||||||
{
|
|
||||||
return hasFlatCurveDataType;
|
|
||||||
}
|
|
||||||
|
|
||||||
Clipboard ();
|
|
||||||
~Clipboard ();
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern Clipboard clipboard;
|
extern Clipboard clipboard;
|
||||||
|
@ -17,8 +17,11 @@
|
|||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "coarsepanel.h"
|
#include "coarsepanel.h"
|
||||||
|
|
||||||
#include "rtimage.h"
|
#include "rtimage.h"
|
||||||
|
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
|
|
||||||
|
@ -16,10 +16,14 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "colorappearance.h"
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
|
#include "colorappearance.h"
|
||||||
|
|
||||||
#include "guiutils.h"
|
#include "guiutils.h"
|
||||||
|
|
||||||
#include "../rtengine/color.h"
|
#include "../rtengine/color.h"
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
#define MINTEMP0 2000 //1200
|
#define MINTEMP0 2000 //1200
|
||||||
#define MAXTEMP0 12000 //12000
|
#define MAXTEMP0 12000 //12000
|
||||||
|
@ -17,9 +17,12 @@
|
|||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "crop.h"
|
#include "crop.h"
|
||||||
|
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "rtimage.h"
|
#include "rtimage.h"
|
||||||
|
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
|
|
||||||
|
@ -23,13 +23,17 @@
|
|||||||
#include "guiutils.h"
|
#include "guiutils.h"
|
||||||
#include "cropwindow.h"
|
#include "cropwindow.h"
|
||||||
#include "imagearea.h"
|
#include "imagearea.h"
|
||||||
|
|
||||||
#include "../rtengine/dcrop.h"
|
#include "../rtengine/dcrop.h"
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
#include "../rtengine/refreshmap.h"
|
#include "../rtengine/refreshmap.h"
|
||||||
#include "../rtengine/rt_math.h"
|
#include "../rtengine/rt_math.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
|
|
||||||
CropHandler::CropHandler() :
|
CropHandler::CropHandler() :
|
||||||
|
cropParams(new procparams::CropParams),
|
||||||
|
colorParams(new procparams::ColorManagementParams),
|
||||||
zoom(100),
|
zoom(100),
|
||||||
ww(0),
|
ww(0),
|
||||||
wh(0),
|
wh(0),
|
||||||
@ -123,8 +127,8 @@ bool CropHandler::isFullDisplay ()
|
|||||||
|
|
||||||
double CropHandler::getFitCropZoom ()
|
double CropHandler::getFitCropZoom ()
|
||||||
{
|
{
|
||||||
double z1 = (double) wh / cropParams.h;
|
double z1 = (double) wh / cropParams->h;
|
||||||
double z2 = (double) ww / cropParams.w;
|
double z2 = (double) ww / cropParams->w;
|
||||||
return z1 < z2 ? z1 : z2;
|
return z1 < z2 ? z1 : z2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -312,8 +316,8 @@ void CropHandler::setDetailedCrop(
|
|||||||
|
|
||||||
cimg.lock ();
|
cimg.lock ();
|
||||||
|
|
||||||
cropParams = cp;
|
*cropParams = cp;
|
||||||
colorParams = cmp;
|
*colorParams = cmp;
|
||||||
|
|
||||||
if (!cropimg.empty()) {
|
if (!cropimg.empty()) {
|
||||||
cropimg.clear();
|
cropimg.clear();
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
|
|
||||||
@ -105,8 +106,8 @@ public:
|
|||||||
void update ();
|
void update ();
|
||||||
|
|
||||||
|
|
||||||
rtengine::procparams::CropParams cropParams;
|
const std::unique_ptr<rtengine::procparams::CropParams> cropParams;
|
||||||
rtengine::procparams::ColorManagementParams colorParams;
|
const std::unique_ptr<rtengine::procparams::ColorManagementParams> colorParams;
|
||||||
Glib::RefPtr<Gdk::Pixbuf> cropPixbuf; // image displayed on monitor, using the monitor profile (i.e. lab to monitor profile)
|
Glib::RefPtr<Gdk::Pixbuf> cropPixbuf; // image displayed on monitor, using the monitor profile (i.e. lab to monitor profile)
|
||||||
Glib::RefPtr<Gdk::Pixbuf> cropPixbuftrue; // internal image in output color space for analysis (i.e. lab to either Working profile or Output profile, depending on options.rtSettings.HistogramWorking)
|
Glib::RefPtr<Gdk::Pixbuf> cropPixbuftrue; // internal image in output color space for analysis (i.e. lab to either Working profile or Output profile, depending on options.rtSettings.HistogramWorking)
|
||||||
|
|
||||||
|
@ -16,21 +16,22 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "cropwindow.h"
|
|
||||||
|
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|
||||||
#include "../rtengine/mytime.h"
|
#include "cropwindow.h"
|
||||||
#include "../rtengine/rt_math.h"
|
|
||||||
#include "../rtengine/dcrop.h"
|
|
||||||
|
|
||||||
#include "guiutils.h"
|
|
||||||
#include "threadutils.h"
|
|
||||||
#include "rtimage.h"
|
|
||||||
#include "cursormanager.h"
|
#include "cursormanager.h"
|
||||||
#include "options.h"
|
#include "guiutils.h"
|
||||||
#include "imagearea.h"
|
#include "imagearea.h"
|
||||||
#include "lockablecolorpicker.h"
|
#include "lockablecolorpicker.h"
|
||||||
|
#include "options.h"
|
||||||
|
#include "rtimage.h"
|
||||||
|
#include "threadutils.h"
|
||||||
|
|
||||||
|
#include "../rtengine/dcrop.h"
|
||||||
|
#include "../rtengine/mytime.h"
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
#include "../rtengine/rt_math.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
|
|
||||||
@ -352,8 +353,8 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y)
|
|||||||
} else {
|
} else {
|
||||||
if (onArea (CropImage, x, y)) { // events inside of the image domain
|
if (onArea (CropImage, x, y)) { // events inside of the image domain
|
||||||
crop_custom_ratio = 0.f;
|
crop_custom_ratio = 0.f;
|
||||||
if ((bstate & GDK_SHIFT_MASK) && cropHandler.cropParams.w > 0 && cropHandler.cropParams.h > 0) {
|
if ((bstate & GDK_SHIFT_MASK) && cropHandler.cropParams->w > 0 && cropHandler.cropParams->h > 0) {
|
||||||
crop_custom_ratio = float(cropHandler.cropParams.w) / float(cropHandler.cropParams.h);
|
crop_custom_ratio = float(cropHandler.cropParams->w) / float(cropHandler.cropParams->h);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iarea->getToolMode () == TMColorPicker) {
|
if (iarea->getToolMode () == TMColorPicker) {
|
||||||
@ -373,7 +374,7 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y)
|
|||||||
// Add a new Color Picker
|
// Add a new Color Picker
|
||||||
rtengine::Coord imgPos;
|
rtengine::Coord imgPos;
|
||||||
screenCoordToImage(x, y, imgPos.x, imgPos.y);
|
screenCoordToImage(x, y, imgPos.x, imgPos.y);
|
||||||
LockableColorPicker *newPicker = new LockableColorPicker(this, &cropHandler.colorParams.outputProfile, &cropHandler.colorParams.workingProfile);
|
LockableColorPicker *newPicker = new LockableColorPicker(this, &cropHandler.colorParams->outputProfile, &cropHandler.colorParams->workingProfile);
|
||||||
colorPickers.push_back(newPicker);
|
colorPickers.push_back(newPicker);
|
||||||
hoveredPicker = newPicker;
|
hoveredPicker = newPicker;
|
||||||
updateHoveredPicker(&imgPos);
|
updateHoveredPicker(&imgPos);
|
||||||
@ -387,49 +388,49 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y)
|
|||||||
} else if (onArea (CropTopLeft, x, y)) {
|
} else if (onArea (CropTopLeft, x, y)) {
|
||||||
state = SResizeTL;
|
state = SResizeTL;
|
||||||
press_x = x;
|
press_x = x;
|
||||||
action_x = cropHandler.cropParams.x;
|
action_x = cropHandler.cropParams->x;
|
||||||
press_y = y;
|
press_y = y;
|
||||||
action_y = cropHandler.cropParams.y;
|
action_y = cropHandler.cropParams->y;
|
||||||
} else if (onArea (CropTopRight, x, y)) {
|
} else if (onArea (CropTopRight, x, y)) {
|
||||||
state = SResizeTR;
|
state = SResizeTR;
|
||||||
press_x = x;
|
press_x = x;
|
||||||
action_x = cropHandler.cropParams.w;
|
action_x = cropHandler.cropParams->w;
|
||||||
press_y = y;
|
press_y = y;
|
||||||
action_y = cropHandler.cropParams.y;
|
action_y = cropHandler.cropParams->y;
|
||||||
} else if (onArea (CropBottomLeft, x, y)) {
|
} else if (onArea (CropBottomLeft, x, y)) {
|
||||||
state = SResizeBL;
|
state = SResizeBL;
|
||||||
press_x = x;
|
press_x = x;
|
||||||
action_x = cropHandler.cropParams.x;
|
action_x = cropHandler.cropParams->x;
|
||||||
press_y = y;
|
press_y = y;
|
||||||
action_y = cropHandler.cropParams.h;
|
action_y = cropHandler.cropParams->h;
|
||||||
} else if (onArea (CropBottomRight, x, y)) {
|
} else if (onArea (CropBottomRight, x, y)) {
|
||||||
state = SResizeBR;
|
state = SResizeBR;
|
||||||
press_x = x;
|
press_x = x;
|
||||||
action_x = cropHandler.cropParams.w;
|
action_x = cropHandler.cropParams->w;
|
||||||
press_y = y;
|
press_y = y;
|
||||||
action_y = cropHandler.cropParams.h;
|
action_y = cropHandler.cropParams->h;
|
||||||
} else if (onArea (CropTop, x, y)) {
|
} else if (onArea (CropTop, x, y)) {
|
||||||
state = SResizeH1;
|
state = SResizeH1;
|
||||||
press_y = y;
|
press_y = y;
|
||||||
action_y = cropHandler.cropParams.y;
|
action_y = cropHandler.cropParams->y;
|
||||||
} else if (onArea (CropBottom, x, y)) {
|
} else if (onArea (CropBottom, x, y)) {
|
||||||
state = SResizeH2;
|
state = SResizeH2;
|
||||||
press_y = y;
|
press_y = y;
|
||||||
action_y = cropHandler.cropParams.h;
|
action_y = cropHandler.cropParams->h;
|
||||||
} else if (onArea (CropLeft, x, y)) {
|
} else if (onArea (CropLeft, x, y)) {
|
||||||
state = SResizeW1;
|
state = SResizeW1;
|
||||||
press_x = x;
|
press_x = x;
|
||||||
action_x = cropHandler.cropParams.x;
|
action_x = cropHandler.cropParams->x;
|
||||||
} else if (onArea (CropRight, x, y)) {
|
} else if (onArea (CropRight, x, y)) {
|
||||||
state = SResizeW2;
|
state = SResizeW2;
|
||||||
press_x = x;
|
press_x = x;
|
||||||
action_x = cropHandler.cropParams.w;
|
action_x = cropHandler.cropParams->w;
|
||||||
} else if ((bstate & GDK_SHIFT_MASK) && onArea (CropInside, x, y)) {
|
} else if ((bstate & GDK_SHIFT_MASK) && onArea (CropInside, x, y)) {
|
||||||
state = SCropMove;
|
state = SCropMove;
|
||||||
press_x = x;
|
press_x = x;
|
||||||
press_y = y;
|
press_y = y;
|
||||||
action_x = cropHandler.cropParams.x;
|
action_x = cropHandler.cropParams->x;
|
||||||
action_y = cropHandler.cropParams.y;
|
action_y = cropHandler.cropParams->y;
|
||||||
} else if (onArea (CropObserved, x, y)) {
|
} else if (onArea (CropObserved, x, y)) {
|
||||||
state = SObservedMove;
|
state = SObservedMove;
|
||||||
press_x = x;
|
press_x = x;
|
||||||
@ -450,11 +451,11 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y)
|
|||||||
} else if (iarea->getToolMode () == TMCropSelect && cropgl) {
|
} else if (iarea->getToolMode () == TMCropSelect && cropgl) {
|
||||||
state = SCropSelecting;
|
state = SCropSelecting;
|
||||||
screenCoordToImage (x, y, press_x, press_y);
|
screenCoordToImage (x, y, press_x, press_y);
|
||||||
cropHandler.cropParams.enabled = true;
|
cropHandler.cropParams->enabled = true;
|
||||||
cropHandler.cropParams.x = press_x;
|
cropHandler.cropParams->x = press_x;
|
||||||
cropHandler.cropParams.y = press_y;
|
cropHandler.cropParams->y = press_y;
|
||||||
cropHandler.cropParams.w = cropHandler.cropParams.h = 1;
|
cropHandler.cropParams->w = cropHandler.cropParams->h = 1;
|
||||||
cropgl->cropInit (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h);
|
cropgl->cropInit (cropHandler.cropParams->x, cropHandler.cropParams->y, cropHandler.cropParams->w, cropHandler.cropParams->h);
|
||||||
} else if (iarea->getToolMode () == TMHand) {
|
} else if (iarea->getToolMode () == TMHand) {
|
||||||
if (editSubscriber) {
|
if (editSubscriber) {
|
||||||
if ((cropgl && cropgl->inImageArea(iarea->posImage.x, iarea->posImage.y) && (editSubscriber->getEditingType() == ET_PIPETTE && (bstate & GDK_CONTROL_MASK))) || editSubscriber->getEditingType() == ET_OBJECTS) {
|
if ((cropgl && cropgl->inImageArea(iarea->posImage.x, iarea->posImage.y) && (editSubscriber->getEditingType() == ET_PIPETTE && (bstate & GDK_CONTROL_MASK))) || editSubscriber->getEditingType() == ET_OBJECTS) {
|
||||||
@ -827,57 +828,57 @@ void CropWindow::pointerMoved (int bstate, int x, int y)
|
|||||||
action_y = y;
|
action_y = y;
|
||||||
iarea->redraw ();
|
iarea->redraw ();
|
||||||
} else if (state == SResizeH1 && cropgl) {
|
} else if (state == SResizeH1 && cropgl) {
|
||||||
int oy = cropHandler.cropParams.y;
|
int oy = cropHandler.cropParams->y;
|
||||||
cropHandler.cropParams.y = action_y + (y - press_y) / zoomSteps[cropZoom].zoom;
|
cropHandler.cropParams->y = action_y + (y - press_y) / zoomSteps[cropZoom].zoom;
|
||||||
cropHandler.cropParams.h += oy - cropHandler.cropParams.y;
|
cropHandler.cropParams->h += oy - cropHandler.cropParams->y;
|
||||||
cropgl->cropHeight1Resized (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h, crop_custom_ratio);
|
cropgl->cropHeight1Resized (cropHandler.cropParams->x, cropHandler.cropParams->y, cropHandler.cropParams->w, cropHandler.cropParams->h, crop_custom_ratio);
|
||||||
iarea->redraw ();
|
iarea->redraw ();
|
||||||
} else if (state == SResizeH2 && cropgl) {
|
} else if (state == SResizeH2 && cropgl) {
|
||||||
cropHandler.cropParams.h = action_y + (y - press_y) / zoomSteps[cropZoom].zoom;
|
cropHandler.cropParams->h = action_y + (y - press_y) / zoomSteps[cropZoom].zoom;
|
||||||
cropgl->cropHeight2Resized (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h, crop_custom_ratio);
|
cropgl->cropHeight2Resized (cropHandler.cropParams->x, cropHandler.cropParams->y, cropHandler.cropParams->w, cropHandler.cropParams->h, crop_custom_ratio);
|
||||||
iarea->redraw ();
|
iarea->redraw ();
|
||||||
} else if (state == SResizeW1 && cropgl) {
|
} else if (state == SResizeW1 && cropgl) {
|
||||||
int ox = cropHandler.cropParams.x;
|
int ox = cropHandler.cropParams->x;
|
||||||
cropHandler.cropParams.x = action_x + (x - press_x) / zoomSteps[cropZoom].zoom;
|
cropHandler.cropParams->x = action_x + (x - press_x) / zoomSteps[cropZoom].zoom;
|
||||||
cropHandler.cropParams.w += ox - cropHandler.cropParams.x;
|
cropHandler.cropParams->w += ox - cropHandler.cropParams->x;
|
||||||
cropgl->cropWidth1Resized (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h, crop_custom_ratio);
|
cropgl->cropWidth1Resized (cropHandler.cropParams->x, cropHandler.cropParams->y, cropHandler.cropParams->w, cropHandler.cropParams->h, crop_custom_ratio);
|
||||||
iarea->redraw ();
|
iarea->redraw ();
|
||||||
} else if (state == SResizeW2 && cropgl) {
|
} else if (state == SResizeW2 && cropgl) {
|
||||||
cropHandler.cropParams.w = action_x + (x - press_x) / zoomSteps[cropZoom].zoom;
|
cropHandler.cropParams->w = action_x + (x - press_x) / zoomSteps[cropZoom].zoom;
|
||||||
cropgl->cropWidth2Resized (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h, crop_custom_ratio);
|
cropgl->cropWidth2Resized (cropHandler.cropParams->x, cropHandler.cropParams->y, cropHandler.cropParams->w, cropHandler.cropParams->h, crop_custom_ratio);
|
||||||
iarea->redraw ();
|
iarea->redraw ();
|
||||||
} else if (state == SResizeTL && cropgl) {
|
} else if (state == SResizeTL && cropgl) {
|
||||||
int ox = cropHandler.cropParams.x;
|
int ox = cropHandler.cropParams->x;
|
||||||
cropHandler.cropParams.x = action_x + (x - press_x) / zoomSteps[cropZoom].zoom;
|
cropHandler.cropParams->x = action_x + (x - press_x) / zoomSteps[cropZoom].zoom;
|
||||||
cropHandler.cropParams.w += ox - cropHandler.cropParams.x;
|
cropHandler.cropParams->w += ox - cropHandler.cropParams->x;
|
||||||
int oy = cropHandler.cropParams.y;
|
int oy = cropHandler.cropParams->y;
|
||||||
cropHandler.cropParams.y = action_y + (y - press_y) / zoomSteps[cropZoom].zoom;
|
cropHandler.cropParams->y = action_y + (y - press_y) / zoomSteps[cropZoom].zoom;
|
||||||
cropHandler.cropParams.h += oy - cropHandler.cropParams.y;
|
cropHandler.cropParams->h += oy - cropHandler.cropParams->y;
|
||||||
cropgl->cropTopLeftResized (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h, crop_custom_ratio);
|
cropgl->cropTopLeftResized (cropHandler.cropParams->x, cropHandler.cropParams->y, cropHandler.cropParams->w, cropHandler.cropParams->h, crop_custom_ratio);
|
||||||
iarea->redraw ();
|
iarea->redraw ();
|
||||||
} else if (state == SResizeTR && cropgl) {
|
} else if (state == SResizeTR && cropgl) {
|
||||||
cropHandler.cropParams.w = action_x + (x - press_x) / zoomSteps[cropZoom].zoom;
|
cropHandler.cropParams->w = action_x + (x - press_x) / zoomSteps[cropZoom].zoom;
|
||||||
int oy = cropHandler.cropParams.y;
|
int oy = cropHandler.cropParams->y;
|
||||||
cropHandler.cropParams.y = action_y + (y - press_y) / zoomSteps[cropZoom].zoom;
|
cropHandler.cropParams->y = action_y + (y - press_y) / zoomSteps[cropZoom].zoom;
|
||||||
cropHandler.cropParams.h += oy - cropHandler.cropParams.y;
|
cropHandler.cropParams->h += oy - cropHandler.cropParams->y;
|
||||||
cropgl->cropTopRightResized (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h, crop_custom_ratio);
|
cropgl->cropTopRightResized (cropHandler.cropParams->x, cropHandler.cropParams->y, cropHandler.cropParams->w, cropHandler.cropParams->h, crop_custom_ratio);
|
||||||
iarea->redraw ();
|
iarea->redraw ();
|
||||||
} else if (state == SResizeBL && cropgl) {
|
} else if (state == SResizeBL && cropgl) {
|
||||||
int ox = cropHandler.cropParams.x;
|
int ox = cropHandler.cropParams->x;
|
||||||
cropHandler.cropParams.x = action_x + (x - press_x) / zoomSteps[cropZoom].zoom;
|
cropHandler.cropParams->x = action_x + (x - press_x) / zoomSteps[cropZoom].zoom;
|
||||||
cropHandler.cropParams.w += ox - cropHandler.cropParams.x;
|
cropHandler.cropParams->w += ox - cropHandler.cropParams->x;
|
||||||
cropHandler.cropParams.h = action_y + (y - press_y) / zoomSteps[cropZoom].zoom;
|
cropHandler.cropParams->h = action_y + (y - press_y) / zoomSteps[cropZoom].zoom;
|
||||||
cropgl->cropBottomLeftResized (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h, crop_custom_ratio);
|
cropgl->cropBottomLeftResized (cropHandler.cropParams->x, cropHandler.cropParams->y, cropHandler.cropParams->w, cropHandler.cropParams->h, crop_custom_ratio);
|
||||||
iarea->redraw ();
|
iarea->redraw ();
|
||||||
} else if (state == SResizeBR && cropgl) {
|
} else if (state == SResizeBR && cropgl) {
|
||||||
cropHandler.cropParams.w = action_x + (x - press_x) / zoomSteps[cropZoom].zoom;
|
cropHandler.cropParams->w = action_x + (x - press_x) / zoomSteps[cropZoom].zoom;
|
||||||
cropHandler.cropParams.h = action_y + (y - press_y) / zoomSteps[cropZoom].zoom;
|
cropHandler.cropParams->h = action_y + (y - press_y) / zoomSteps[cropZoom].zoom;
|
||||||
cropgl->cropBottomRightResized (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h, crop_custom_ratio);
|
cropgl->cropBottomRightResized (cropHandler.cropParams->x, cropHandler.cropParams->y, cropHandler.cropParams->w, cropHandler.cropParams->h, crop_custom_ratio);
|
||||||
iarea->redraw ();
|
iarea->redraw ();
|
||||||
} else if (state == SCropMove && cropgl) {
|
} else if (state == SCropMove && cropgl) {
|
||||||
cropHandler.cropParams.x = action_x + (x - press_x) / zoomSteps[cropZoom].zoom;
|
cropHandler.cropParams->x = action_x + (x - press_x) / zoomSteps[cropZoom].zoom;
|
||||||
cropHandler.cropParams.y = action_y + (y - press_y) / zoomSteps[cropZoom].zoom;
|
cropHandler.cropParams->y = action_y + (y - press_y) / zoomSteps[cropZoom].zoom;
|
||||||
cropgl->cropMoved (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h);
|
cropgl->cropMoved (cropHandler.cropParams->x, cropHandler.cropParams->y, cropHandler.cropParams->w, cropHandler.cropParams->h);
|
||||||
iarea->redraw ();
|
iarea->redraw ();
|
||||||
} else if (state == SCropSelecting && cropgl) {
|
} else if (state == SCropSelecting && cropgl) {
|
||||||
screenCoordToImage (x, y, action_x, action_y);
|
screenCoordToImage (x, y, action_x, action_y);
|
||||||
@ -886,19 +887,19 @@ void CropWindow::pointerMoved (int bstate, int x, int y)
|
|||||||
cropgl->cropResized (cx1, cy1, cx2, cy2);
|
cropgl->cropResized (cx1, cy1, cx2, cy2);
|
||||||
|
|
||||||
if (cx2 > cx1) {
|
if (cx2 > cx1) {
|
||||||
cropHandler.cropParams.x = cx1;
|
cropHandler.cropParams->x = cx1;
|
||||||
cropHandler.cropParams.w = cx2 - cx1 + 1;
|
cropHandler.cropParams->w = cx2 - cx1 + 1;
|
||||||
} else {
|
} else {
|
||||||
cropHandler.cropParams.x = cx2;
|
cropHandler.cropParams->x = cx2;
|
||||||
cropHandler.cropParams.w = cx1 - cx2 + 1;
|
cropHandler.cropParams->w = cx1 - cx2 + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cy2 > cy1) {
|
if (cy2 > cy1) {
|
||||||
cropHandler.cropParams.y = cy1;
|
cropHandler.cropParams->y = cy1;
|
||||||
cropHandler.cropParams.h = cy2 - cy1 + 1;
|
cropHandler.cropParams->h = cy2 - cy1 + 1;
|
||||||
} else {
|
} else {
|
||||||
cropHandler.cropParams.y = cy2;
|
cropHandler.cropParams->y = cy2;
|
||||||
cropHandler.cropParams.h = cy1 - cy2 + 1;
|
cropHandler.cropParams->h = cy1 - cy2 + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
iarea->redraw ();
|
iarea->redraw ();
|
||||||
@ -1018,17 +1019,17 @@ void CropWindow::pointerMoved (int bstate, int x, int y)
|
|||||||
|
|
||||||
if (!onArea (CropImage, x, y) || !cropHandler.cropPixbuftrue) {
|
if (!onArea (CropImage, x, y) || !cropHandler.cropPixbuftrue) {
|
||||||
cropHandler.getFullImageSize(mx, my);
|
cropHandler.getFullImageSize(mx, my);
|
||||||
// pmlistener->pointerMoved (false, cropHandler.colorParams.working, mx, my, -1, -1, -1);
|
// pmlistener->pointerMoved (false, cropHandler.colorParams->working, mx, my, -1, -1, -1);
|
||||||
// if (pmhlistener) pmhlistener->pointerMoved (false, cropHandler.colorParams.working, mx, my, -1, -1, -1);
|
// if (pmhlistener) pmhlistener->pointerMoved (false, cropHandler.colorParams->working, mx, my, -1, -1, -1);
|
||||||
/* Glib::ustring outputProfile;
|
/* Glib::ustring outputProfile;
|
||||||
outputProfile =cropHandler.colorParams.output ;
|
outputProfile =cropHandler.colorParams->output ;
|
||||||
printf("Using \"%s\" output\n", outputProfile.c_str());
|
printf("Using \"%s\" output\n", outputProfile.c_str());
|
||||||
if(outputProfile==options.rtSettings.srgb) printf("OK SRGB2");
|
if(outputProfile==options.rtSettings.srgb) printf("OK SRGB2");
|
||||||
*/
|
*/
|
||||||
pmlistener->pointerMoved (false, cropHandler.colorParams.outputProfile, cropHandler.colorParams.workingProfile, mx, my, -1, -1, -1);
|
pmlistener->pointerMoved (false, cropHandler.colorParams->outputProfile, cropHandler.colorParams->workingProfile, mx, my, -1, -1, -1);
|
||||||
|
|
||||||
if (pmhlistener) {
|
if (pmhlistener) {
|
||||||
pmhlistener->pointerMoved (false, cropHandler.colorParams.outputProfile, cropHandler.colorParams.workingProfile, mx, my, -1, -1, -1);
|
pmhlistener->pointerMoved (false, cropHandler.colorParams->outputProfile, cropHandler.colorParams->workingProfile, mx, my, -1, -1, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -1075,11 +1076,11 @@ void CropWindow::pointerMoved (int bstate, int x, int y)
|
|||||||
|
|
||||||
// Updates the Navigator
|
// Updates the Navigator
|
||||||
// TODO: possible double color conversion if rval, gval, bval come from cropHandler.cropPixbuftrue ? see issue #4583
|
// TODO: possible double color conversion if rval, gval, bval come from cropHandler.cropPixbuftrue ? see issue #4583
|
||||||
pmlistener->pointerMoved (true, cropHandler.colorParams.outputProfile, cropHandler.colorParams.workingProfile, mx, my, rval, gval, bval, isRaw);
|
pmlistener->pointerMoved (true, cropHandler.colorParams->outputProfile, cropHandler.colorParams->workingProfile, mx, my, rval, gval, bval, isRaw);
|
||||||
|
|
||||||
if (pmhlistener) {
|
if (pmhlistener) {
|
||||||
// Updates the HistogramRGBArea
|
// Updates the HistogramRGBArea
|
||||||
pmhlistener->pointerMoved (true, cropHandler.colorParams.outputProfile, cropHandler.colorParams.workingProfile, mx, my, rval, gval, bval);
|
pmhlistener->pointerMoved (true, cropHandler.colorParams->outputProfile, cropHandler.colorParams->workingProfile, mx, my, rval, gval, bval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1119,87 +1120,87 @@ bool CropWindow::onArea (CursorArea a, int x, int y)
|
|||||||
|
|
||||||
case CropTopLeft:
|
case CropTopLeft:
|
||||||
screenCoordToImage (x, y, x1, y1);
|
screenCoordToImage (x, y, x1, y1);
|
||||||
return cropHandler.cropParams.enabled &&
|
return cropHandler.cropParams->enabled &&
|
||||||
y1 >= cropHandler.cropParams.y - CROPRESIZEBORDER &&
|
y1 >= cropHandler.cropParams->y - CROPRESIZEBORDER &&
|
||||||
y1 <= cropHandler.cropParams.y + CROPRESIZEBORDER &&
|
y1 <= cropHandler.cropParams->y + CROPRESIZEBORDER &&
|
||||||
y >= ypos + imgY &&
|
y >= ypos + imgY &&
|
||||||
x1 >= cropHandler.cropParams.x - CROPRESIZEBORDER &&
|
x1 >= cropHandler.cropParams->x - CROPRESIZEBORDER &&
|
||||||
x1 <= cropHandler.cropParams.x + CROPRESIZEBORDER &&
|
x1 <= cropHandler.cropParams->x + CROPRESIZEBORDER &&
|
||||||
x >= xpos + imgX;
|
x >= xpos + imgX;
|
||||||
|
|
||||||
case CropTopRight:
|
case CropTopRight:
|
||||||
screenCoordToImage (x, y, x1, y1);
|
screenCoordToImage (x, y, x1, y1);
|
||||||
return cropHandler.cropParams.enabled &&
|
return cropHandler.cropParams->enabled &&
|
||||||
y1 >= cropHandler.cropParams.y - CROPRESIZEBORDER &&
|
y1 >= cropHandler.cropParams->y - CROPRESIZEBORDER &&
|
||||||
y1 <= cropHandler.cropParams.y + CROPRESIZEBORDER &&
|
y1 <= cropHandler.cropParams->y + CROPRESIZEBORDER &&
|
||||||
y >= ypos + imgY &&
|
y >= ypos + imgY &&
|
||||||
x1 >= cropHandler.cropParams.x + cropHandler.cropParams.w - 1 - CROPRESIZEBORDER &&
|
x1 >= cropHandler.cropParams->x + cropHandler.cropParams->w - 1 - CROPRESIZEBORDER &&
|
||||||
x1 <= cropHandler.cropParams.x + cropHandler.cropParams.w - 1 + CROPRESIZEBORDER &&
|
x1 <= cropHandler.cropParams->x + cropHandler.cropParams->w - 1 + CROPRESIZEBORDER &&
|
||||||
x < xpos + imgX + imgW;
|
x < xpos + imgX + imgW;
|
||||||
|
|
||||||
case CropBottomLeft:
|
case CropBottomLeft:
|
||||||
screenCoordToImage (x, y, x1, y1);
|
screenCoordToImage (x, y, x1, y1);
|
||||||
return cropHandler.cropParams.enabled &&
|
return cropHandler.cropParams->enabled &&
|
||||||
y1 >= cropHandler.cropParams.y + cropHandler.cropParams.h - 1 - CROPRESIZEBORDER &&
|
y1 >= cropHandler.cropParams->y + cropHandler.cropParams->h - 1 - CROPRESIZEBORDER &&
|
||||||
y1 <= cropHandler.cropParams.y + cropHandler.cropParams.h - 1 + CROPRESIZEBORDER &&
|
y1 <= cropHandler.cropParams->y + cropHandler.cropParams->h - 1 + CROPRESIZEBORDER &&
|
||||||
y < ypos + imgY + imgH &&
|
y < ypos + imgY + imgH &&
|
||||||
x1 >= cropHandler.cropParams.x - CROPRESIZEBORDER &&
|
x1 >= cropHandler.cropParams->x - CROPRESIZEBORDER &&
|
||||||
x1 <= cropHandler.cropParams.x + CROPRESIZEBORDER &&
|
x1 <= cropHandler.cropParams->x + CROPRESIZEBORDER &&
|
||||||
x >= xpos + imgX;
|
x >= xpos + imgX;
|
||||||
|
|
||||||
case CropBottomRight:
|
case CropBottomRight:
|
||||||
screenCoordToImage (x, y, x1, y1);
|
screenCoordToImage (x, y, x1, y1);
|
||||||
return cropHandler.cropParams.enabled &&
|
return cropHandler.cropParams->enabled &&
|
||||||
y1 >= cropHandler.cropParams.y + cropHandler.cropParams.h - 1 - CROPRESIZEBORDER &&
|
y1 >= cropHandler.cropParams->y + cropHandler.cropParams->h - 1 - CROPRESIZEBORDER &&
|
||||||
y1 <= cropHandler.cropParams.y + cropHandler.cropParams.h - 1 + CROPRESIZEBORDER &&
|
y1 <= cropHandler.cropParams->y + cropHandler.cropParams->h - 1 + CROPRESIZEBORDER &&
|
||||||
y < ypos + imgY + imgH &&
|
y < ypos + imgY + imgH &&
|
||||||
x1 >= cropHandler.cropParams.x + cropHandler.cropParams.w - 1 - CROPRESIZEBORDER &&
|
x1 >= cropHandler.cropParams->x + cropHandler.cropParams->w - 1 - CROPRESIZEBORDER &&
|
||||||
x1 <= cropHandler.cropParams.x + cropHandler.cropParams.w - 1 + CROPRESIZEBORDER &&
|
x1 <= cropHandler.cropParams->x + cropHandler.cropParams->w - 1 + CROPRESIZEBORDER &&
|
||||||
x < xpos + imgX + imgW;
|
x < xpos + imgX + imgW;
|
||||||
|
|
||||||
case CropTop:
|
case CropTop:
|
||||||
screenCoordToImage (x, y, x1, y1);
|
screenCoordToImage (x, y, x1, y1);
|
||||||
return cropHandler.cropParams.enabled &&
|
return cropHandler.cropParams->enabled &&
|
||||||
x1 > cropHandler.cropParams.x + CROPRESIZEBORDER &&
|
x1 > cropHandler.cropParams->x + CROPRESIZEBORDER &&
|
||||||
x1 < cropHandler.cropParams.x + cropHandler.cropParams.w - 1 - CROPRESIZEBORDER &&
|
x1 < cropHandler.cropParams->x + cropHandler.cropParams->w - 1 - CROPRESIZEBORDER &&
|
||||||
y1 > cropHandler.cropParams.y - CROPRESIZEBORDER &&
|
y1 > cropHandler.cropParams->y - CROPRESIZEBORDER &&
|
||||||
y1 < cropHandler.cropParams.y + CROPRESIZEBORDER &&
|
y1 < cropHandler.cropParams->y + CROPRESIZEBORDER &&
|
||||||
y >= ypos + imgY;
|
y >= ypos + imgY;
|
||||||
|
|
||||||
case CropBottom:
|
case CropBottom:
|
||||||
screenCoordToImage (x, y, x1, y1);
|
screenCoordToImage (x, y, x1, y1);
|
||||||
return cropHandler.cropParams.enabled &&
|
return cropHandler.cropParams->enabled &&
|
||||||
x1 > cropHandler.cropParams.x + CROPRESIZEBORDER &&
|
x1 > cropHandler.cropParams->x + CROPRESIZEBORDER &&
|
||||||
x1 < cropHandler.cropParams.x + cropHandler.cropParams.w - 1 - CROPRESIZEBORDER &&
|
x1 < cropHandler.cropParams->x + cropHandler.cropParams->w - 1 - CROPRESIZEBORDER &&
|
||||||
y1 > cropHandler.cropParams.y + cropHandler.cropParams.h - 1 - CROPRESIZEBORDER &&
|
y1 > cropHandler.cropParams->y + cropHandler.cropParams->h - 1 - CROPRESIZEBORDER &&
|
||||||
y1 < cropHandler.cropParams.y + cropHandler.cropParams.h - 1 + CROPRESIZEBORDER &&
|
y1 < cropHandler.cropParams->y + cropHandler.cropParams->h - 1 + CROPRESIZEBORDER &&
|
||||||
y < ypos + imgY + imgH;
|
y < ypos + imgY + imgH;
|
||||||
|
|
||||||
case CropLeft:
|
case CropLeft:
|
||||||
screenCoordToImage (x, y, x1, y1);
|
screenCoordToImage (x, y, x1, y1);
|
||||||
return cropHandler.cropParams.enabled &&
|
return cropHandler.cropParams->enabled &&
|
||||||
y1 > cropHandler.cropParams.y + CROPRESIZEBORDER &&
|
y1 > cropHandler.cropParams->y + CROPRESIZEBORDER &&
|
||||||
y1 < cropHandler.cropParams.y + cropHandler.cropParams.h - 1 - CROPRESIZEBORDER &&
|
y1 < cropHandler.cropParams->y + cropHandler.cropParams->h - 1 - CROPRESIZEBORDER &&
|
||||||
x1 > cropHandler.cropParams.x - CROPRESIZEBORDER &&
|
x1 > cropHandler.cropParams->x - CROPRESIZEBORDER &&
|
||||||
x1 < cropHandler.cropParams.x + CROPRESIZEBORDER &&
|
x1 < cropHandler.cropParams->x + CROPRESIZEBORDER &&
|
||||||
x >= xpos + imgX;
|
x >= xpos + imgX;
|
||||||
|
|
||||||
case CropRight:
|
case CropRight:
|
||||||
screenCoordToImage (x, y, x1, y1);
|
screenCoordToImage (x, y, x1, y1);
|
||||||
return cropHandler.cropParams.enabled &&
|
return cropHandler.cropParams->enabled &&
|
||||||
y1 > cropHandler.cropParams.y + CROPRESIZEBORDER &&
|
y1 > cropHandler.cropParams->y + CROPRESIZEBORDER &&
|
||||||
y1 < cropHandler.cropParams.y + cropHandler.cropParams.h - 1 - CROPRESIZEBORDER &&
|
y1 < cropHandler.cropParams->y + cropHandler.cropParams->h - 1 - CROPRESIZEBORDER &&
|
||||||
x1 > cropHandler.cropParams.x + cropHandler.cropParams.w - 1 - CROPRESIZEBORDER &&
|
x1 > cropHandler.cropParams->x + cropHandler.cropParams->w - 1 - CROPRESIZEBORDER &&
|
||||||
x1 < cropHandler.cropParams.x + cropHandler.cropParams.w - 1 + CROPRESIZEBORDER &&
|
x1 < cropHandler.cropParams->x + cropHandler.cropParams->w - 1 + CROPRESIZEBORDER &&
|
||||||
x < xpos + imgX + imgW;
|
x < xpos + imgX + imgW;
|
||||||
|
|
||||||
case CropInside:
|
case CropInside:
|
||||||
screenCoordToImage (x, y, x1, y1);
|
screenCoordToImage (x, y, x1, y1);
|
||||||
return cropHandler.cropParams.enabled &&
|
return cropHandler.cropParams->enabled &&
|
||||||
y1 > cropHandler.cropParams.y &&
|
y1 > cropHandler.cropParams->y &&
|
||||||
y1 < cropHandler.cropParams.y + cropHandler.cropParams.h - 1 &&
|
y1 < cropHandler.cropParams->y + cropHandler.cropParams->h - 1 &&
|
||||||
x1 > cropHandler.cropParams.x &&
|
x1 > cropHandler.cropParams->x &&
|
||||||
x1 < cropHandler.cropParams.x + cropHandler.cropParams.w - 1;
|
x1 < cropHandler.cropParams->x + cropHandler.cropParams->w - 1;
|
||||||
|
|
||||||
case CropResize:
|
case CropResize:
|
||||||
return decorated && x >= xpos + width - 16 && y >= ypos + height - 16 && x < xpos + width && y < ypos + height;
|
return decorated && x >= xpos + width - 16 && y >= ypos + height - 16 && x < xpos + width && y < ypos + height;
|
||||||
@ -1367,7 +1368,7 @@ void CropWindow::expose (Cairo::RefPtr<Cairo::Context> cr)
|
|||||||
Gdk::Cairo::set_source_pixbuf(cr, rough, posX, posY);
|
Gdk::Cairo::set_source_pixbuf(cr, rough, posX, posY);
|
||||||
cr->rectangle(posX, posY, rtengine::min (rough->get_width (), imgAreaW-imgX), rtengine::min (rough->get_height (), imgAreaH-imgY));
|
cr->rectangle(posX, posY, rtengine::min (rough->get_width (), imgAreaW-imgX), rtengine::min (rough->get_height (), imgAreaH-imgY));
|
||||||
cr->fill();
|
cr->fill();
|
||||||
// if (cropHandler.cropParams.enabled)
|
// if (cropHandler.cropParams->enabled)
|
||||||
// drawCrop (cr, x+imgX, y+imgY, imgW, imgH, cropX, cropY, zoomSteps[cropZoom].zoom, cropHandler.cropParams);
|
// drawCrop (cr, x+imgX, y+imgY, imgW, imgH, cropX, cropY, zoomSteps[cropZoom].zoom, cropHandler.cropParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1375,7 +1376,7 @@ void CropWindow::expose (Cairo::RefPtr<Cairo::Context> cr)
|
|||||||
drawObservedFrame (cr);
|
drawObservedFrame (cr);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
CropParams cropParams = cropHandler.cropParams;
|
CropParams cropParams = *cropHandler.cropParams;
|
||||||
if (state == SNormal) {
|
if (state == SNormal) {
|
||||||
switch (options.cropGuides) {
|
switch (options.cropGuides) {
|
||||||
case Options::CROP_GUIDE_NONE:
|
case Options::CROP_GUIDE_NONE:
|
||||||
@ -1805,7 +1806,7 @@ void CropWindow::expose (Cairo::RefPtr<Cairo::Context> cr)
|
|||||||
cr->fill();
|
cr->fill();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cropHandler.cropParams.enabled) {
|
if (cropHandler.cropParams->enabled) {
|
||||||
int cropX, cropY;
|
int cropX, cropY;
|
||||||
cropHandler.getPosition (cropX, cropY);
|
cropHandler.getPosition (cropX, cropY);
|
||||||
drawCrop (cr, x + imgAreaX + imgX, y + imgAreaY + imgY, imgW, imgH, cropX, cropY, zoomSteps[cropZoom].zoom, cropParams, (this == iarea->mainCropWindow), useBgColor, cropHandler.isFullDisplay ());
|
drawCrop (cr, x + imgAreaX + imgX, y + imgAreaY + imgY, imgW, imgH, cropX, cropY, zoomSteps[cropZoom].zoom, cropParams, (this == iarea->mainCropWindow), useBgColor, cropHandler.isFullDisplay ());
|
||||||
@ -1888,7 +1889,7 @@ void CropWindow::expose (Cairo::RefPtr<Cairo::Context> cr)
|
|||||||
cr->rectangle(posX, posY, rtengine::min (rough->get_width (), imgAreaW-imgX), rtengine::min (rough->get_height (), imgAreaH-imgY));
|
cr->rectangle(posX, posY, rtengine::min (rough->get_width (), imgAreaW-imgX), rtengine::min (rough->get_height (), imgAreaH-imgY));
|
||||||
cr->fill();
|
cr->fill();
|
||||||
|
|
||||||
if (cropHandler.cropParams.enabled) {
|
if (cropHandler.cropParams->enabled) {
|
||||||
drawCrop (cr, x + imgAreaX + imgX, y + imgAreaY + imgY, rough->get_width(), rough->get_height(), cropX, cropY, zoomSteps[cropZoom].zoom, cropParams, (this == iarea->mainCropWindow), useBgColor, cropHandler.isFullDisplay ());
|
drawCrop (cr, x + imgAreaX + imgX, y + imgAreaY + imgY, rough->get_width(), rough->get_height(), cropX, cropY, zoomSteps[cropZoom].zoom, cropParams, (this == iarea->mainCropWindow), useBgColor, cropHandler.isFullDisplay ());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1947,9 +1948,9 @@ void CropWindow::zoomIn (bool toCursor, int cursorX, int cursorY)
|
|||||||
y = cursorY;
|
y = cursorY;
|
||||||
} else {
|
} else {
|
||||||
if (zoomSteps[cropZoom].zoom <= cropHandler.getFitZoom()) {
|
if (zoomSteps[cropZoom].zoom <= cropHandler.getFitZoom()) {
|
||||||
if (cropHandler.cropParams.enabled) {
|
if (cropHandler.cropParams->enabled) {
|
||||||
x = cropHandler.cropParams.x + cropHandler.cropParams.w / 2;
|
x = cropHandler.cropParams->x + cropHandler.cropParams->w / 2;
|
||||||
y = cropHandler.cropParams.y + cropHandler.cropParams.h / 2;
|
y = cropHandler.cropParams->y + cropHandler.cropParams->h / 2;
|
||||||
} else {
|
} else {
|
||||||
int fw, fh;
|
int fw, fh;
|
||||||
cropHandler.getFullImageSize(fw, fh);
|
cropHandler.getFullImageSize(fw, fh);
|
||||||
@ -1961,11 +1962,11 @@ void CropWindow::zoomIn (bool toCursor, int cursorX, int cursorY)
|
|||||||
} else if (zoomVersion != exposeVersion) {
|
} else if (zoomVersion != exposeVersion) {
|
||||||
screenCoordToImage(xpos + imgX + imgW / 2, ypos + imgY + imgH / 2, x, y);
|
screenCoordToImage(xpos + imgX + imgW / 2, ypos + imgY + imgH / 2, x, y);
|
||||||
|
|
||||||
if (cropHandler.cropParams.enabled) {
|
if (cropHandler.cropParams->enabled) {
|
||||||
// add some gravity towards crop center
|
// add some gravity towards crop center
|
||||||
int x1 = cropHandler.cropParams.x + cropHandler.cropParams.w / 2;
|
int x1 = cropHandler.cropParams->x + cropHandler.cropParams->w / 2;
|
||||||
int y1 = cropHandler.cropParams.y + cropHandler.cropParams.h / 2;
|
int y1 = cropHandler.cropParams->y + cropHandler.cropParams->h / 2;
|
||||||
double cropd = sqrt(cropHandler.cropParams.h * cropHandler.cropParams.h + cropHandler.cropParams.w * cropHandler.cropParams.w) * zoomSteps[cropZoom].zoom;
|
double cropd = sqrt(cropHandler.cropParams->h * cropHandler.cropParams->h + cropHandler.cropParams->w * cropHandler.cropParams->w) * zoomSteps[cropZoom].zoom;
|
||||||
double imd = sqrt(imgW * imgW + imgH * imgH);
|
double imd = sqrt(imgW * imgW + imgH * imgH);
|
||||||
double d;
|
double d;
|
||||||
|
|
||||||
@ -2023,9 +2024,9 @@ void CropWindow::zoom11 (bool notify)
|
|||||||
int y = -1;
|
int y = -1;
|
||||||
|
|
||||||
if (zoomSteps[cropZoom].zoom <= cropHandler.getFitZoom()) {
|
if (zoomSteps[cropZoom].zoom <= cropHandler.getFitZoom()) {
|
||||||
if (cropHandler.cropParams.enabled) {
|
if (cropHandler.cropParams->enabled) {
|
||||||
x = cropHandler.cropParams.x + cropHandler.cropParams.w / 2;
|
x = cropHandler.cropParams->x + cropHandler.cropParams->w / 2;
|
||||||
y = cropHandler.cropParams.y + cropHandler.cropParams.h / 2;
|
y = cropHandler.cropParams->y + cropHandler.cropParams->h / 2;
|
||||||
} else {
|
} else {
|
||||||
int fw, fh;
|
int fw, fh;
|
||||||
cropHandler.getFullImageSize(fw, fh);
|
cropHandler.getFullImageSize(fw, fh);
|
||||||
@ -2114,7 +2115,7 @@ void CropWindow::zoomFit ()
|
|||||||
|
|
||||||
void CropWindow::zoomFitCrop ()
|
void CropWindow::zoomFitCrop ()
|
||||||
{
|
{
|
||||||
if(cropHandler.cropParams.enabled) {
|
if(cropHandler.cropParams->enabled) {
|
||||||
double z = cropHandler.getFitCropZoom ();
|
double z = cropHandler.getFitCropZoom ();
|
||||||
int cz = int(zoomSteps.size())-1;
|
int cz = int(zoomSteps.size())-1;
|
||||||
|
|
||||||
@ -2129,8 +2130,8 @@ void CropWindow::zoomFitCrop ()
|
|||||||
|
|
||||||
zoomVersion = exposeVersion;
|
zoomVersion = exposeVersion;
|
||||||
int centerX, centerY;
|
int centerX, centerY;
|
||||||
centerX = cropHandler.cropParams.x + cropHandler.cropParams.w / 2;
|
centerX = cropHandler.cropParams->x + cropHandler.cropParams->w / 2;
|
||||||
centerY = cropHandler.cropParams.y + cropHandler.cropParams.h / 2;
|
centerY = cropHandler.cropParams->y + cropHandler.cropParams->h / 2;
|
||||||
setCropAnchorPosition(centerX, centerY);
|
setCropAnchorPosition(centerX, centerY);
|
||||||
changeZoom (cz, true, centerX, centerY);
|
changeZoom (cz, true, centerX, centerY);
|
||||||
fitZoom = options.cropAutoFit;
|
fitZoom = options.cropAutoFit;
|
||||||
|
@ -16,12 +16,16 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "darkframe.h"
|
|
||||||
#include "options.h"
|
|
||||||
#include "guiutils.h"
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
#include "darkframe.h"
|
||||||
|
|
||||||
|
#include "guiutils.h"
|
||||||
|
#include "options.h"
|
||||||
#include "rtimage.h"
|
#include "rtimage.h"
|
||||||
|
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
|
|
||||||
|
@ -16,9 +16,12 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "defringe.h"
|
|
||||||
#include <iomanip>
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <iomanip>
|
||||||
|
|
||||||
|
#include "defringe.h"
|
||||||
|
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
|
@ -17,10 +17,14 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "dehaze.h"
|
|
||||||
#include "eventmapper.h"
|
|
||||||
#include <iomanip>
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <iomanip>
|
||||||
|
|
||||||
|
#include "dehaze.h"
|
||||||
|
|
||||||
|
#include "eventmapper.h"
|
||||||
|
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
|
@ -16,12 +16,16 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "dirpyrdenoise.h"
|
|
||||||
#include <iomanip>
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <iomanip>
|
||||||
|
|
||||||
|
#include "dirpyrdenoise.h"
|
||||||
|
|
||||||
#include "edit.h"
|
#include "edit.h"
|
||||||
#include "guiutils.h"
|
#include "guiutils.h"
|
||||||
|
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
extern Options options;
|
extern Options options;
|
||||||
|
@ -16,10 +16,14 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "distortion.h"
|
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|
||||||
|
#include "distortion.h"
|
||||||
|
|
||||||
#include "rtimage.h"
|
#include "rtimage.h"
|
||||||
|
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
|
|
||||||
|
@ -16,9 +16,12 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "epd.h"
|
|
||||||
#include <iomanip>
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <iomanip>
|
||||||
|
|
||||||
|
#include "epd.h"
|
||||||
|
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
|
@ -21,13 +21,17 @@
|
|||||||
#include "guiutils.h"
|
#include "guiutils.h"
|
||||||
#include "rtimage.h"
|
#include "rtimage.h"
|
||||||
|
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
using namespace rtexif;
|
using namespace rtexif;
|
||||||
|
|
||||||
ExifPanel::ExifPanel () : idata (nullptr)
|
ExifPanel::ExifPanel() :
|
||||||
|
idata(nullptr),
|
||||||
|
changeList(new rtengine::procparams::ExifPairs),
|
||||||
|
defChangeList(new rtengine::procparams::ExifPairs)
|
||||||
{
|
{
|
||||||
|
|
||||||
recursiveOp = true;
|
recursiveOp = true;
|
||||||
|
|
||||||
exifTree = Gtk::manage (new Gtk::TreeView());
|
exifTree = Gtk::manage (new Gtk::TreeView());
|
||||||
@ -166,7 +170,7 @@ void ExifPanel::read (const ProcParams* pp, const ParamsEdited* pedited)
|
|||||||
|
|
||||||
disableListener ();
|
disableListener ();
|
||||||
|
|
||||||
changeList = pp->exif;
|
*changeList = pp->exif;
|
||||||
setImageData (idata);
|
setImageData (idata);
|
||||||
applyChangeList ();
|
applyChangeList ();
|
||||||
exifSelectionChanged ();
|
exifSelectionChanged ();
|
||||||
@ -178,13 +182,13 @@ void ExifPanel::write (ProcParams* pp, ParamsEdited* pedited)
|
|||||||
{
|
{
|
||||||
|
|
||||||
// updateChangeList ();
|
// updateChangeList ();
|
||||||
pp->exif = changeList;
|
pp->exif = *changeList;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExifPanel::setDefaults (const ProcParams* defParams, const ParamsEdited* pedited)
|
void ExifPanel::setDefaults (const ProcParams* defParams, const ParamsEdited* pedited)
|
||||||
{
|
{
|
||||||
|
|
||||||
defChangeList = defParams->exif;
|
*defChangeList = defParams->exif;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExifPanel::setImageData (const FramesMetaData* id)
|
void ExifPanel::setImageData (const FramesMetaData* id)
|
||||||
@ -457,7 +461,7 @@ void ExifPanel::resetAllPressed ()
|
|||||||
{
|
{
|
||||||
|
|
||||||
setImageData (idata);
|
setImageData (idata);
|
||||||
changeList = defChangeList;
|
*changeList = *defChangeList;
|
||||||
applyChangeList ();
|
applyChangeList ();
|
||||||
exifSelectionChanged ();
|
exifSelectionChanged ();
|
||||||
notifyListener ();
|
notifyListener ();
|
||||||
@ -661,11 +665,11 @@ void ExifPanel::updateChangeList (Gtk::TreeModel::Children root, std::string pre
|
|||||||
|
|
||||||
for (iter = root.begin(); iter != root.end(); ++iter) {
|
for (iter = root.begin(); iter != root.end(); ++iter) {
|
||||||
if (iter->get_value (exifColumns.edited)) {
|
if (iter->get_value (exifColumns.edited)) {
|
||||||
changeList[ prefix + iter->get_value (exifColumns.field_nopango) ] = iter->get_value (exifColumns.value_nopango);
|
(*changeList)[ prefix + iter->get_value (exifColumns.field_nopango) ] = iter->get_value (exifColumns.value_nopango);
|
||||||
} else if (iter->get_value (exifColumns.action) == AC_WRITE && iter->get_value (exifColumns.icon) == delicon) {
|
} else if (iter->get_value (exifColumns.action) == AC_WRITE && iter->get_value (exifColumns.icon) == delicon) {
|
||||||
changeList[ prefix + iter->get_value (exifColumns.field_nopango) ] = "#delete";
|
(*changeList)[ prefix + iter->get_value (exifColumns.field_nopango) ] = "#delete";
|
||||||
} else if (iter->get_value (exifColumns.action) == AC_DONTWRITE && iter->get_value (exifColumns.icon) == keepicon) {
|
} else if (iter->get_value (exifColumns.action) == AC_DONTWRITE && iter->get_value (exifColumns.icon) == keepicon) {
|
||||||
changeList[ prefix + iter->get_value (exifColumns.field_nopango) ] = "#keep";
|
(*changeList)[ prefix + iter->get_value (exifColumns.field_nopango) ] = "#keep";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iter->get_value (exifColumns.icon) == keepicon) {
|
if (iter->get_value (exifColumns.icon) == keepicon) {
|
||||||
@ -677,14 +681,14 @@ void ExifPanel::updateChangeList (Gtk::TreeModel::Children root, std::string pre
|
|||||||
void ExifPanel::updateChangeList ()
|
void ExifPanel::updateChangeList ()
|
||||||
{
|
{
|
||||||
|
|
||||||
changeList.clear ();
|
changeList->clear ();
|
||||||
updateChangeList (exifTreeModel->children(), "");
|
updateChangeList (exifTreeModel->children(), "");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExifPanel::applyChangeList ()
|
void ExifPanel::applyChangeList ()
|
||||||
{
|
{
|
||||||
|
|
||||||
for (rtengine::procparams::ExifPairs::iterator i = changeList.begin(); i != changeList.end(); ++i) {
|
for (rtengine::procparams::ExifPairs::const_iterator i = changeList->begin(); i != changeList->end(); ++i) {
|
||||||
editTag (exifTreeModel->children(), i->first, i->second);
|
editTag (exifTreeModel->children(), i->first, i->second);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,10 @@
|
|||||||
#ifndef _EXIFPANEL_
|
#ifndef _EXIFPANEL_
|
||||||
#define _EXIFPANEL_
|
#define _EXIFPANEL_
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
|
|
||||||
#include "toolpanel.h"
|
#include "toolpanel.h"
|
||||||
|
|
||||||
class ExifPanel : public Gtk::VBox, public ToolPanel
|
class ExifPanel : public Gtk::VBox, public ToolPanel
|
||||||
@ -27,8 +30,8 @@ class ExifPanel : public Gtk::VBox, public ToolPanel
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
const rtengine::FramesMetaData* idata;
|
const rtengine::FramesMetaData* idata;
|
||||||
rtengine::procparams::ExifPairs changeList;
|
const std::unique_ptr<rtengine::procparams::ExifPairs> changeList;
|
||||||
rtengine::procparams::ExifPairs defChangeList;
|
const std::unique_ptr<rtengine::procparams::ExifPairs> defChangeList;
|
||||||
bool recursiveOp;
|
bool recursiveOp;
|
||||||
|
|
||||||
class ExifColumns : public Gtk::TreeModelColumnRecord
|
class ExifColumns : public Gtk::TreeModelColumnRecord
|
||||||
|
@ -22,6 +22,8 @@
|
|||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "rtimage.h"
|
#include "rtimage.h"
|
||||||
|
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
|
|
||||||
|
@ -17,10 +17,15 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "fattaltonemap.h"
|
|
||||||
#include "eventmapper.h"
|
|
||||||
#include <iomanip>
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <iomanip>
|
||||||
|
|
||||||
|
#include "fattaltonemap.h"
|
||||||
|
|
||||||
|
#include "eventmapper.h"
|
||||||
|
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
|
@ -18,19 +18,24 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "filebrowser.h"
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
#include <glibmm.h>
|
#include <glibmm.h>
|
||||||
#include "options.h"
|
|
||||||
#include "multilangmgr.h"
|
#include "filebrowser.h"
|
||||||
#include "clipboard.h"
|
|
||||||
#include "procparamchangers.h"
|
|
||||||
#include "batchqueue.h"
|
#include "batchqueue.h"
|
||||||
#include "../rtengine/dfmanager.h"
|
#include "clipboard.h"
|
||||||
#include "../rtengine/ffmanager.h"
|
#include "multilangmgr.h"
|
||||||
|
#include "options.h"
|
||||||
|
#include "procparamchangers.h"
|
||||||
#include "rtimage.h"
|
#include "rtimage.h"
|
||||||
#include "threadutils.h"
|
#include "threadutils.h"
|
||||||
|
|
||||||
|
#include "../rtengine/dfmanager.h"
|
||||||
|
#include "../rtengine/ffmanager.h"
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
extern Options options;
|
extern Options options;
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
|
@ -18,15 +18,17 @@
|
|||||||
*/
|
*/
|
||||||
#include "filebrowserentry.h"
|
#include "filebrowserentry.h"
|
||||||
|
|
||||||
#include <iomanip>
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#include <iomanip>
|
||||||
|
|
||||||
#include "guiutils.h"
|
|
||||||
#include "threadutils.h"
|
|
||||||
#include "rtimage.h"
|
|
||||||
#include "cursormanager.h"
|
#include "cursormanager.h"
|
||||||
#include "thumbbrowserbase.h"
|
#include "guiutils.h"
|
||||||
#include "inspector.h"
|
#include "inspector.h"
|
||||||
|
#include "rtimage.h"
|
||||||
|
#include "threadutils.h"
|
||||||
|
#include "thumbbrowserbase.h"
|
||||||
|
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
#define CROPRESIZEBORDER 4
|
#define CROPRESIZEBORDER 4
|
||||||
|
|
||||||
@ -40,7 +42,7 @@ Glib::RefPtr<Gdk::Pixbuf> FileBrowserEntry::hdr;
|
|||||||
Glib::RefPtr<Gdk::Pixbuf> FileBrowserEntry::ps;
|
Glib::RefPtr<Gdk::Pixbuf> FileBrowserEntry::ps;
|
||||||
|
|
||||||
FileBrowserEntry::FileBrowserEntry (Thumbnail* thm, const Glib::ustring& fname)
|
FileBrowserEntry::FileBrowserEntry (Thumbnail* thm, const Glib::ustring& fname)
|
||||||
: ThumbBrowserEntryBase (fname), wasInside(false), iatlistener(nullptr), press_x(0), press_y(0), action_x(0), action_y(0), rot_deg(0.0), landscape(true), cropgl(nullptr), state(SNormal), crop_custom_ratio(0.f)
|
: ThumbBrowserEntryBase (fname), wasInside(false), iatlistener(nullptr), press_x(0), press_y(0), action_x(0), action_y(0), rot_deg(0.0), landscape(true), cropParams(new rtengine::procparams::CropParams), cropgl(nullptr), state(SNormal), crop_custom_ratio(0.f)
|
||||||
{
|
{
|
||||||
thumbnail = thm;
|
thumbnail = thm;
|
||||||
|
|
||||||
@ -163,9 +165,9 @@ std::vector<Glib::RefPtr<Gdk::Pixbuf> > FileBrowserEntry::getSpecificityIconsOnI
|
|||||||
|
|
||||||
void FileBrowserEntry::customBackBufferUpdate (Cairo::RefPtr<Cairo::Context> c)
|
void FileBrowserEntry::customBackBufferUpdate (Cairo::RefPtr<Cairo::Context> c)
|
||||||
{
|
{
|
||||||
if(scale != 1.0 && cropParams.enabled) { // somewhere in pipeline customBackBufferUpdate is called when scale == 1.0, which is nonsense for a thumb
|
if(scale != 1.0 && cropParams->enabled) { // somewhere in pipeline customBackBufferUpdate is called when scale == 1.0, which is nonsense for a thumb
|
||||||
if (state == SCropSelecting || state == SResizeH1 || state == SResizeH2 || state == SResizeW1 || state == SResizeW2 || state == SResizeTL || state == SResizeTR || state == SResizeBL || state == SResizeBR || state == SCropMove) {
|
if (state == SCropSelecting || state == SResizeH1 || state == SResizeH2 || state == SResizeW1 || state == SResizeW2 || state == SResizeTL || state == SResizeTR || state == SResizeBL || state == SResizeBR || state == SCropMove) {
|
||||||
drawCrop (c, prex, prey, prew, preh, 0, 0, scale, cropParams, true, false);
|
drawCrop (c, prex, prey, prew, preh, 0, 0, scale, *cropParams, true, false);
|
||||||
} else {
|
} else {
|
||||||
rtengine::procparams::CropParams cparams = thumbnail->getProcParams().crop;
|
rtengine::procparams::CropParams cparams = thumbnail->getProcParams().crop;
|
||||||
switch (options.cropGuides) {
|
switch (options.cropGuides) {
|
||||||
@ -246,7 +248,7 @@ void FileBrowserEntry::_updateImage(rtengine::IImage8* img, double s, const rten
|
|||||||
|
|
||||||
redrawRequests--;
|
redrawRequests--;
|
||||||
scale = s;
|
scale = s;
|
||||||
this->cropParams = cropParams;
|
*this->cropParams = cropParams;
|
||||||
|
|
||||||
bool newLandscape = img->getWidth() > img->getHeight();
|
bool newLandscape = img->getWidth() > img->getHeight();
|
||||||
bool rotated = false;
|
bool rotated = false;
|
||||||
@ -319,65 +321,65 @@ bool FileBrowserEntry::motionNotify (int x, int y)
|
|||||||
action_y = y;
|
action_y = y;
|
||||||
parent->redrawNeeded (this);
|
parent->redrawNeeded (this);
|
||||||
} else if (state == SResizeH1 && cropgl) {
|
} else if (state == SResizeH1 && cropgl) {
|
||||||
int oy = cropParams.y;
|
int oy = cropParams->y;
|
||||||
cropParams.y = action_y + (y - press_y) / scale;
|
cropParams->y = action_y + (y - press_y) / scale;
|
||||||
cropParams.h += oy - cropParams.y;
|
cropParams->h += oy - cropParams->y;
|
||||||
cropgl->cropHeight1Resized (cropParams.x, cropParams.y, cropParams.w, cropParams.h, crop_custom_ratio);
|
cropgl->cropHeight1Resized (cropParams->x, cropParams->y, cropParams->w, cropParams->h, crop_custom_ratio);
|
||||||
updateBackBuffer ();
|
updateBackBuffer ();
|
||||||
parent->redrawNeeded (this);
|
parent->redrawNeeded (this);
|
||||||
} else if (state == SResizeH2 && cropgl) {
|
} else if (state == SResizeH2 && cropgl) {
|
||||||
cropParams.h = action_y + (y - press_y) / scale;
|
cropParams->h = action_y + (y - press_y) / scale;
|
||||||
cropgl->cropHeight2Resized (cropParams.x, cropParams.y, cropParams.w, cropParams.h, crop_custom_ratio);
|
cropgl->cropHeight2Resized (cropParams->x, cropParams->y, cropParams->w, cropParams->h, crop_custom_ratio);
|
||||||
updateBackBuffer ();
|
updateBackBuffer ();
|
||||||
parent->redrawNeeded (this);
|
parent->redrawNeeded (this);
|
||||||
} else if (state == SResizeW1 && cropgl) {
|
} else if (state == SResizeW1 && cropgl) {
|
||||||
int ox = cropParams.x;
|
int ox = cropParams->x;
|
||||||
cropParams.x = action_x + (x - press_x) / scale;
|
cropParams->x = action_x + (x - press_x) / scale;
|
||||||
cropParams.w += ox - cropParams.x;
|
cropParams->w += ox - cropParams->x;
|
||||||
cropgl->cropWidth1Resized (cropParams.x, cropParams.y, cropParams.w, cropParams.h, crop_custom_ratio);
|
cropgl->cropWidth1Resized (cropParams->x, cropParams->y, cropParams->w, cropParams->h, crop_custom_ratio);
|
||||||
updateBackBuffer ();
|
updateBackBuffer ();
|
||||||
parent->redrawNeeded (this);
|
parent->redrawNeeded (this);
|
||||||
} else if (state == SResizeW2 && cropgl) {
|
} else if (state == SResizeW2 && cropgl) {
|
||||||
cropParams.w = action_x + (x - press_x) / scale;
|
cropParams->w = action_x + (x - press_x) / scale;
|
||||||
cropgl->cropWidth2Resized (cropParams.x, cropParams.y, cropParams.w, cropParams.h, crop_custom_ratio);
|
cropgl->cropWidth2Resized (cropParams->x, cropParams->y, cropParams->w, cropParams->h, crop_custom_ratio);
|
||||||
updateBackBuffer ();
|
updateBackBuffer ();
|
||||||
parent->redrawNeeded (this);
|
parent->redrawNeeded (this);
|
||||||
} else if (state == SResizeTL && cropgl) {
|
} else if (state == SResizeTL && cropgl) {
|
||||||
int ox = cropParams.x;
|
int ox = cropParams->x;
|
||||||
cropParams.x = action_x + (x - press_x) / scale;
|
cropParams->x = action_x + (x - press_x) / scale;
|
||||||
cropParams.w += ox - cropParams.x;
|
cropParams->w += ox - cropParams->x;
|
||||||
int oy = cropParams.y;
|
int oy = cropParams->y;
|
||||||
cropParams.y = action_y + (y - press_y) / scale;
|
cropParams->y = action_y + (y - press_y) / scale;
|
||||||
cropParams.h += oy - cropParams.y;
|
cropParams->h += oy - cropParams->y;
|
||||||
cropgl->cropTopLeftResized (cropParams.x, cropParams.y, cropParams.w, cropParams.h, crop_custom_ratio);
|
cropgl->cropTopLeftResized (cropParams->x, cropParams->y, cropParams->w, cropParams->h, crop_custom_ratio);
|
||||||
updateBackBuffer ();
|
updateBackBuffer ();
|
||||||
parent->redrawNeeded (this);
|
parent->redrawNeeded (this);
|
||||||
} else if (state == SResizeTR && cropgl) {
|
} else if (state == SResizeTR && cropgl) {
|
||||||
cropParams.w = action_x + (x - press_x) / scale;
|
cropParams->w = action_x + (x - press_x) / scale;
|
||||||
int oy = cropParams.y;
|
int oy = cropParams->y;
|
||||||
cropParams.y = action_y + (y - press_y) / scale;
|
cropParams->y = action_y + (y - press_y) / scale;
|
||||||
cropParams.h += oy - cropParams.y;
|
cropParams->h += oy - cropParams->y;
|
||||||
cropgl->cropTopRightResized (cropParams.x, cropParams.y, cropParams.w, cropParams.h, crop_custom_ratio);
|
cropgl->cropTopRightResized (cropParams->x, cropParams->y, cropParams->w, cropParams->h, crop_custom_ratio);
|
||||||
updateBackBuffer ();
|
updateBackBuffer ();
|
||||||
parent->redrawNeeded (this);
|
parent->redrawNeeded (this);
|
||||||
} else if (state == SResizeBL && cropgl) {
|
} else if (state == SResizeBL && cropgl) {
|
||||||
int ox = cropParams.x;
|
int ox = cropParams->x;
|
||||||
cropParams.x = action_x + (x - press_x) / scale;
|
cropParams->x = action_x + (x - press_x) / scale;
|
||||||
cropParams.w += ox - cropParams.x;
|
cropParams->w += ox - cropParams->x;
|
||||||
cropParams.h = action_y + (y - press_y) / scale;
|
cropParams->h = action_y + (y - press_y) / scale;
|
||||||
cropgl->cropBottomLeftResized (cropParams.x, cropParams.y, cropParams.w, cropParams.h, crop_custom_ratio);
|
cropgl->cropBottomLeftResized (cropParams->x, cropParams->y, cropParams->w, cropParams->h, crop_custom_ratio);
|
||||||
updateBackBuffer ();
|
updateBackBuffer ();
|
||||||
parent->redrawNeeded (this);
|
parent->redrawNeeded (this);
|
||||||
} else if (state == SResizeBR && cropgl) {
|
} else if (state == SResizeBR && cropgl) {
|
||||||
cropParams.w = action_x + (x - press_x) / scale;
|
cropParams->w = action_x + (x - press_x) / scale;
|
||||||
cropParams.h = action_y + (y - press_y) / scale;
|
cropParams->h = action_y + (y - press_y) / scale;
|
||||||
cropgl->cropBottomRightResized (cropParams.x, cropParams.y, cropParams.w, cropParams.h, crop_custom_ratio);
|
cropgl->cropBottomRightResized (cropParams->x, cropParams->y, cropParams->w, cropParams->h, crop_custom_ratio);
|
||||||
updateBackBuffer ();
|
updateBackBuffer ();
|
||||||
parent->redrawNeeded (this);
|
parent->redrawNeeded (this);
|
||||||
} else if (state == SCropMove && cropgl) {
|
} else if (state == SCropMove && cropgl) {
|
||||||
cropParams.x = action_x + (x - press_x) / scale;
|
cropParams->x = action_x + (x - press_x) / scale;
|
||||||
cropParams.y = action_y + (y - press_y) / scale;
|
cropParams->y = action_y + (y - press_y) / scale;
|
||||||
cropgl->cropMoved (cropParams.x, cropParams.y, cropParams.w, cropParams.h);
|
cropgl->cropMoved (cropParams->x, cropParams->y, cropParams->w, cropParams->h);
|
||||||
updateBackBuffer ();
|
updateBackBuffer ();
|
||||||
parent->redrawNeeded (this);
|
parent->redrawNeeded (this);
|
||||||
} else if (state == SCropSelecting && cropgl) {
|
} else if (state == SCropSelecting && cropgl) {
|
||||||
@ -386,19 +388,19 @@ bool FileBrowserEntry::motionNotify (int x, int y)
|
|||||||
cropgl->cropResized (cx1, cy1, cx2, cy2);
|
cropgl->cropResized (cx1, cy1, cx2, cy2);
|
||||||
|
|
||||||
if (cx2 > cx1) {
|
if (cx2 > cx1) {
|
||||||
cropParams.x = cx1;
|
cropParams->x = cx1;
|
||||||
cropParams.w = cx2 - cx1 + 1;
|
cropParams->w = cx2 - cx1 + 1;
|
||||||
} else {
|
} else {
|
||||||
cropParams.x = cx2;
|
cropParams->x = cx2;
|
||||||
cropParams.w = cx1 - cx2 + 1;
|
cropParams->w = cx1 - cx2 + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cy2 > cy1) {
|
if (cy2 > cy1) {
|
||||||
cropParams.y = cy1;
|
cropParams->y = cy1;
|
||||||
cropParams.h = cy2 - cy1 + 1;
|
cropParams->h = cy2 - cy1 + 1;
|
||||||
} else {
|
} else {
|
||||||
cropParams.y = cy2;
|
cropParams->y = cy2;
|
||||||
cropParams.h = cy1 - cy2 + 1;
|
cropParams->h = cy1 - cy2 + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateBackBuffer ();
|
updateBackBuffer ();
|
||||||
@ -429,71 +431,71 @@ bool FileBrowserEntry::pressNotify (int button, int type, int bstate, int x, i
|
|||||||
|
|
||||||
if (!b && selected && inside (x, y)) {
|
if (!b && selected && inside (x, y)) {
|
||||||
if (button == 1 && type == GDK_BUTTON_PRESS && state == SNormal) {
|
if (button == 1 && type == GDK_BUTTON_PRESS && state == SNormal) {
|
||||||
if ((bstate & GDK_SHIFT_MASK) && cropParams.w > 0 && cropParams.h > 0) {
|
if ((bstate & GDK_SHIFT_MASK) && cropParams->w > 0 && cropParams->h > 0) {
|
||||||
crop_custom_ratio = float(cropParams.w) / float(cropParams.h);
|
crop_custom_ratio = float(cropParams->w) / float(cropParams->h);
|
||||||
}
|
}
|
||||||
if (onArea (CropTopLeft, ix, iy)) {
|
if (onArea (CropTopLeft, ix, iy)) {
|
||||||
state = SResizeTL;
|
state = SResizeTL;
|
||||||
press_x = x;
|
press_x = x;
|
||||||
action_x = cropParams.x;
|
action_x = cropParams->x;
|
||||||
press_y = y;
|
press_y = y;
|
||||||
action_y = cropParams.y;
|
action_y = cropParams->y;
|
||||||
cropgl = iatlistener->startCropEditing (thumbnail);
|
cropgl = iatlistener->startCropEditing (thumbnail);
|
||||||
b = true;
|
b = true;
|
||||||
} else if (onArea (CropTopRight, ix, iy)) {
|
} else if (onArea (CropTopRight, ix, iy)) {
|
||||||
state = SResizeTR;
|
state = SResizeTR;
|
||||||
press_x = x;
|
press_x = x;
|
||||||
action_x = cropParams.w;
|
action_x = cropParams->w;
|
||||||
press_y = y;
|
press_y = y;
|
||||||
action_y = cropParams.y;
|
action_y = cropParams->y;
|
||||||
cropgl = iatlistener->startCropEditing (thumbnail);
|
cropgl = iatlistener->startCropEditing (thumbnail);
|
||||||
b = true;
|
b = true;
|
||||||
} else if (onArea (CropBottomLeft, ix, iy)) {
|
} else if (onArea (CropBottomLeft, ix, iy)) {
|
||||||
state = SResizeBL;
|
state = SResizeBL;
|
||||||
press_x = x;
|
press_x = x;
|
||||||
action_x = cropParams.x;
|
action_x = cropParams->x;
|
||||||
press_y = y;
|
press_y = y;
|
||||||
action_y = cropParams.h;
|
action_y = cropParams->h;
|
||||||
cropgl = iatlistener->startCropEditing (thumbnail);
|
cropgl = iatlistener->startCropEditing (thumbnail);
|
||||||
b = true;
|
b = true;
|
||||||
} else if (onArea (CropBottomRight, ix, iy)) {
|
} else if (onArea (CropBottomRight, ix, iy)) {
|
||||||
state = SResizeBR;
|
state = SResizeBR;
|
||||||
press_x = x;
|
press_x = x;
|
||||||
action_x = cropParams.w;
|
action_x = cropParams->w;
|
||||||
press_y = y;
|
press_y = y;
|
||||||
action_y = cropParams.h;
|
action_y = cropParams->h;
|
||||||
cropgl = iatlistener->startCropEditing (thumbnail);
|
cropgl = iatlistener->startCropEditing (thumbnail);
|
||||||
b = true;
|
b = true;
|
||||||
} else if (onArea (CropTop, ix, iy)) {
|
} else if (onArea (CropTop, ix, iy)) {
|
||||||
state = SResizeH1;
|
state = SResizeH1;
|
||||||
press_y = y;
|
press_y = y;
|
||||||
action_y = cropParams.y;
|
action_y = cropParams->y;
|
||||||
cropgl = iatlistener->startCropEditing (thumbnail);
|
cropgl = iatlistener->startCropEditing (thumbnail);
|
||||||
b = true;
|
b = true;
|
||||||
} else if (onArea (CropBottom, ix, iy)) {
|
} else if (onArea (CropBottom, ix, iy)) {
|
||||||
state = SResizeH2;
|
state = SResizeH2;
|
||||||
press_y = y;
|
press_y = y;
|
||||||
action_y = cropParams.h;
|
action_y = cropParams->h;
|
||||||
cropgl = iatlistener->startCropEditing (thumbnail);
|
cropgl = iatlistener->startCropEditing (thumbnail);
|
||||||
b = true;
|
b = true;
|
||||||
} else if (onArea (CropLeft, ix, iy)) {
|
} else if (onArea (CropLeft, ix, iy)) {
|
||||||
state = SResizeW1;
|
state = SResizeW1;
|
||||||
press_x = x;
|
press_x = x;
|
||||||
action_x = cropParams.x;
|
action_x = cropParams->x;
|
||||||
cropgl = iatlistener->startCropEditing (thumbnail);
|
cropgl = iatlistener->startCropEditing (thumbnail);
|
||||||
b = true;
|
b = true;
|
||||||
} else if (onArea (CropRight, ix, iy)) {
|
} else if (onArea (CropRight, ix, iy)) {
|
||||||
state = SResizeW2;
|
state = SResizeW2;
|
||||||
press_x = x;
|
press_x = x;
|
||||||
action_x = cropParams.w;
|
action_x = cropParams->w;
|
||||||
cropgl = iatlistener->startCropEditing (thumbnail);
|
cropgl = iatlistener->startCropEditing (thumbnail);
|
||||||
b = true;
|
b = true;
|
||||||
} else if ((bstate & GDK_SHIFT_MASK) && onArea (CropInside, ix, iy)) {
|
} else if ((bstate & GDK_SHIFT_MASK) && onArea (CropInside, ix, iy)) {
|
||||||
state = SCropMove;
|
state = SCropMove;
|
||||||
press_x = x;
|
press_x = x;
|
||||||
press_y = y;
|
press_y = y;
|
||||||
action_x = cropParams.x;
|
action_x = cropParams->x;
|
||||||
action_y = cropParams.y;
|
action_y = cropParams->y;
|
||||||
cropgl = iatlistener->startCropEditing (thumbnail);
|
cropgl = iatlistener->startCropEditing (thumbnail);
|
||||||
b = true;
|
b = true;
|
||||||
} else if (onArea (CropImage, ix, iy)) {
|
} else if (onArea (CropImage, ix, iy)) {
|
||||||
@ -513,10 +515,10 @@ bool FileBrowserEntry::pressNotify (int button, int type, int bstate, int x, i
|
|||||||
|
|
||||||
if (cropgl) {
|
if (cropgl) {
|
||||||
state = SCropSelecting;
|
state = SCropSelecting;
|
||||||
press_x = cropParams.x = (ix - prex) / scale;
|
press_x = cropParams->x = (ix - prex) / scale;
|
||||||
press_y = cropParams.y = (iy - prey) / scale;
|
press_y = cropParams->y = (iy - prey) / scale;
|
||||||
cropParams.w = cropParams.h = 1;
|
cropParams->w = cropParams->h = 1;
|
||||||
cropgl->cropInit (cropParams.x, cropParams.y, cropParams.w, cropParams.h);
|
cropgl->cropInit (cropParams->x, cropParams->y, cropParams->w, cropParams->h);
|
||||||
b = true;
|
b = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -582,67 +584,67 @@ bool FileBrowserEntry::onArea (CursorArea a, int x, int y)
|
|||||||
return x >= prex && x < prex + prew && y >= prey && y < prey + preh;
|
return x >= prex && x < prex + prew && y >= prey && y < prey + preh;
|
||||||
|
|
||||||
case CropTopLeft:
|
case CropTopLeft:
|
||||||
return cropParams.enabled &&
|
return cropParams->enabled &&
|
||||||
y1 >= cropParams.y - cropResizeBorder &&
|
y1 >= cropParams->y - cropResizeBorder &&
|
||||||
y1 <= cropParams.y + cropResizeBorder &&
|
y1 <= cropParams->y + cropResizeBorder &&
|
||||||
x1 >= cropParams.x - cropResizeBorder &&
|
x1 >= cropParams->x - cropResizeBorder &&
|
||||||
x1 <= cropParams.x + cropResizeBorder;
|
x1 <= cropParams->x + cropResizeBorder;
|
||||||
|
|
||||||
case CropTopRight:
|
case CropTopRight:
|
||||||
return cropParams.enabled &&
|
return cropParams->enabled &&
|
||||||
y1 >= cropParams.y - cropResizeBorder &&
|
y1 >= cropParams->y - cropResizeBorder &&
|
||||||
y1 <= cropParams.y + cropResizeBorder &&
|
y1 <= cropParams->y + cropResizeBorder &&
|
||||||
x1 >= cropParams.x + cropParams.w - 1 - cropResizeBorder &&
|
x1 >= cropParams->x + cropParams->w - 1 - cropResizeBorder &&
|
||||||
x1 <= cropParams.x + cropParams.w - 1 + cropResizeBorder;
|
x1 <= cropParams->x + cropParams->w - 1 + cropResizeBorder;
|
||||||
|
|
||||||
case CropBottomLeft:
|
case CropBottomLeft:
|
||||||
return cropParams.enabled &&
|
return cropParams->enabled &&
|
||||||
y1 >= cropParams.y + cropParams.h - 1 - cropResizeBorder &&
|
y1 >= cropParams->y + cropParams->h - 1 - cropResizeBorder &&
|
||||||
y1 <= cropParams.y + cropParams.h - 1 + cropResizeBorder &&
|
y1 <= cropParams->y + cropParams->h - 1 + cropResizeBorder &&
|
||||||
x1 >= cropParams.x - cropResizeBorder &&
|
x1 >= cropParams->x - cropResizeBorder &&
|
||||||
x1 <= cropParams.x + cropResizeBorder;
|
x1 <= cropParams->x + cropResizeBorder;
|
||||||
|
|
||||||
case CropBottomRight:
|
case CropBottomRight:
|
||||||
return cropParams.enabled &&
|
return cropParams->enabled &&
|
||||||
y1 >= cropParams.y + cropParams.h - 1 - cropResizeBorder &&
|
y1 >= cropParams->y + cropParams->h - 1 - cropResizeBorder &&
|
||||||
y1 <= cropParams.y + cropParams.h - 1 + cropResizeBorder &&
|
y1 <= cropParams->y + cropParams->h - 1 + cropResizeBorder &&
|
||||||
x1 >= cropParams.x + cropParams.w - 1 - cropResizeBorder &&
|
x1 >= cropParams->x + cropParams->w - 1 - cropResizeBorder &&
|
||||||
x1 <= cropParams.x + cropParams.w - 1 + cropResizeBorder;
|
x1 <= cropParams->x + cropParams->w - 1 + cropResizeBorder;
|
||||||
|
|
||||||
case CropTop:
|
case CropTop:
|
||||||
return cropParams.enabled &&
|
return cropParams->enabled &&
|
||||||
x1 > cropParams.x + cropResizeBorder &&
|
x1 > cropParams->x + cropResizeBorder &&
|
||||||
x1 < cropParams.x + cropParams.w - 1 - cropResizeBorder &&
|
x1 < cropParams->x + cropParams->w - 1 - cropResizeBorder &&
|
||||||
y1 > cropParams.y - cropResizeBorder &&
|
y1 > cropParams->y - cropResizeBorder &&
|
||||||
y1 < cropParams.y + cropResizeBorder;
|
y1 < cropParams->y + cropResizeBorder;
|
||||||
|
|
||||||
case CropBottom:
|
case CropBottom:
|
||||||
return cropParams.enabled &&
|
return cropParams->enabled &&
|
||||||
x1 > cropParams.x + cropResizeBorder &&
|
x1 > cropParams->x + cropResizeBorder &&
|
||||||
x1 < cropParams.x + cropParams.w - 1 - cropResizeBorder &&
|
x1 < cropParams->x + cropParams->w - 1 - cropResizeBorder &&
|
||||||
y1 > cropParams.y + cropParams.h - 1 - cropResizeBorder &&
|
y1 > cropParams->y + cropParams->h - 1 - cropResizeBorder &&
|
||||||
y1 < cropParams.y + cropParams.h - 1 + cropResizeBorder;
|
y1 < cropParams->y + cropParams->h - 1 + cropResizeBorder;
|
||||||
|
|
||||||
case CropLeft:
|
case CropLeft:
|
||||||
return cropParams.enabled &&
|
return cropParams->enabled &&
|
||||||
y1 > cropParams.y + cropResizeBorder &&
|
y1 > cropParams->y + cropResizeBorder &&
|
||||||
y1 < cropParams.y + cropParams.h - 1 - cropResizeBorder &&
|
y1 < cropParams->y + cropParams->h - 1 - cropResizeBorder &&
|
||||||
x1 > cropParams.x - cropResizeBorder &&
|
x1 > cropParams->x - cropResizeBorder &&
|
||||||
x1 < cropParams.x + cropResizeBorder;
|
x1 < cropParams->x + cropResizeBorder;
|
||||||
|
|
||||||
case CropRight:
|
case CropRight:
|
||||||
return cropParams.enabled &&
|
return cropParams->enabled &&
|
||||||
y1 > cropParams.y + cropResizeBorder &&
|
y1 > cropParams->y + cropResizeBorder &&
|
||||||
y1 < cropParams.y + cropParams.h - 1 - cropResizeBorder &&
|
y1 < cropParams->y + cropParams->h - 1 - cropResizeBorder &&
|
||||||
x1 > cropParams.x + cropParams.w - 1 - cropResizeBorder &&
|
x1 > cropParams->x + cropParams->w - 1 - cropResizeBorder &&
|
||||||
x1 < cropParams.x + cropParams.w - 1 + cropResizeBorder;
|
x1 < cropParams->x + cropParams->w - 1 + cropResizeBorder;
|
||||||
|
|
||||||
case CropInside:
|
case CropInside:
|
||||||
return cropParams.enabled &&
|
return cropParams->enabled &&
|
||||||
y1 > cropParams.y &&
|
y1 > cropParams->y &&
|
||||||
y1 < cropParams.y + cropParams.h - 1 &&
|
y1 < cropParams->y + cropParams->h - 1 &&
|
||||||
x1 > cropParams.x &&
|
x1 > cropParams->x &&
|
||||||
x1 < cropParams.x + cropParams.w - 1;
|
x1 < cropParams->x + cropParams->w - 1;
|
||||||
default: /* do nothing */ ;
|
default: /* do nothing */ ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#define _FILEBROWSERENTRY_
|
#define _FILEBROWSERENTRY_
|
||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
|
|
||||||
@ -55,7 +56,7 @@ class FileBrowserEntry : public ThumbBrowserEntryBase,
|
|||||||
int press_x, press_y, action_x, action_y;
|
int press_x, press_y, action_x, action_y;
|
||||||
double rot_deg;
|
double rot_deg;
|
||||||
bool landscape;
|
bool landscape;
|
||||||
rtengine::procparams::CropParams cropParams;
|
const std::unique_ptr<rtengine::procparams::CropParams> cropParams;
|
||||||
CropGUIListener* cropgl;
|
CropGUIListener* cropgl;
|
||||||
FileBrowserEntryIdleHelper* feih;
|
FileBrowserEntryIdleHelper* feih;
|
||||||
|
|
||||||
|
@ -1187,7 +1187,7 @@ void FileCatalog::developRequested(const std::vector<FileBrowserEntry*>& tbe, bo
|
|||||||
params.icm.inputProfile = options.fastexport_icm_input_profile;
|
params.icm.inputProfile = options.fastexport_icm_input_profile;
|
||||||
params.icm.workingProfile = options.fastexport_icm_working_profile;
|
params.icm.workingProfile = options.fastexport_icm_working_profile;
|
||||||
params.icm.outputProfile = options.fastexport_icm_output_profile;
|
params.icm.outputProfile = options.fastexport_icm_output_profile;
|
||||||
params.icm.outputIntent = options.fastexport_icm_outputIntent;
|
params.icm.outputIntent = rtengine::RenderingIntent(options.fastexport_icm_outputIntent);
|
||||||
params.icm.outputBPC = options.fastexport_icm_outputBPC;
|
params.icm.outputBPC = options.fastexport_icm_outputBPC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
|
#include <chrono>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
#include "filmsimulation.h"
|
#include "filmsimulation.h"
|
||||||
|
|
||||||
#include <chrono>
|
|
||||||
|
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
|
|
||||||
#include "../rtengine/clutstore.h"
|
#include "../rtengine/clutstore.h"
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
|
@ -16,12 +16,16 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "flatfield.h"
|
|
||||||
#include "options.h"
|
|
||||||
#include "guiutils.h"
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
#include "flatfield.h"
|
||||||
|
|
||||||
|
#include "guiutils.h"
|
||||||
|
#include "options.h"
|
||||||
#include "rtimage.h"
|
#include "rtimage.h"
|
||||||
|
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
|
|
||||||
|
@ -2,7 +2,10 @@
|
|||||||
* This file is part of RawTherapee.
|
* This file is part of RawTherapee.
|
||||||
*/
|
*/
|
||||||
#include "gradient.h"
|
#include "gradient.h"
|
||||||
|
|
||||||
#include "rtimage.h"
|
#include "rtimage.h"
|
||||||
|
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
#include "../rtengine/rt_math.h"
|
#include "../rtengine/rt_math.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "../rtengine/rt_math.h"
|
#include "../rtengine/rt_math.h"
|
||||||
#include "../rtengine/utils.h"
|
#include "../rtengine/utils.h"
|
||||||
#include "../rtengine/icons.h"
|
#include "../rtengine/icons.h"
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
#include "rtimage.h"
|
#include "rtimage.h"
|
||||||
#include "multilangmgr.h"
|
#include "multilangmgr.h"
|
||||||
|
|
||||||
|
@ -17,10 +17,13 @@
|
|||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "history.h"
|
#include "history.h"
|
||||||
|
|
||||||
|
#include "eventmapper.h"
|
||||||
|
#include "guiutils.h"
|
||||||
#include "multilangmgr.h"
|
#include "multilangmgr.h"
|
||||||
#include "rtimage.h"
|
#include "rtimage.h"
|
||||||
#include "guiutils.h"
|
|
||||||
#include "eventmapper.h"
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
|
@ -16,9 +16,10 @@
|
|||||||
*
|
*
|
||||||
* 2010 Ilya Popov <ilia_popov@rambler.ru>
|
* 2010 Ilya Popov <ilia_popov@rambler.ru>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "hsvequalizer.h"
|
#include "hsvequalizer.h"
|
||||||
|
|
||||||
#include "../rtengine/color.h"
|
#include "../rtengine/color.h"
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user