Merge branch 'dev' into spot-removal-tool
This commit is contained in:
@@ -289,7 +289,10 @@ void RawImageSource::getAutoMatchedToneCurve(const ColorManagementParams &cp, st
|
|||||||
histMatchingCache = outCurve;
|
histMatchingCache = outCurve;
|
||||||
*histMatchingParams = cp;
|
*histMatchingParams = cp;
|
||||||
return;
|
return;
|
||||||
} else if (w * 32 < fw) {
|
} else if (w * 33 < fw || w * h < 19200) {
|
||||||
|
// Some cameras have extremely small thumbs, for example Canon PowerShot A3100 IS has 128x96 thumbs.
|
||||||
|
// For them we skip histogram matching.
|
||||||
|
// With 160x120 thumbs from RICOH GR DIGITAL 2 it works fine, so we use 19200 as limit.
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
@@ -896,7 +896,7 @@ void OPIcon::drawImage(Cairo::RefPtr<RTSurface> &img,
|
|||||||
rtengine::Coord tl, br; // Coordinate of the rectangle in the CropBuffer coordinate system
|
rtengine::Coord tl, br; // Coordinate of the rectangle in the CropBuffer coordinate system
|
||||||
drivenPointToRectangle(pos, tl, br, imgW, imgH);
|
drivenPointToRectangle(pos, tl, br, imgW, imgH);
|
||||||
|
|
||||||
cr->set_source(img->surface, tl.x, tl.y);
|
cr->set_source(img->get(), tl.x, tl.y);
|
||||||
cr->set_line_width(0.);
|
cr->set_line_width(0.);
|
||||||
cr->rectangle(tl.x, tl.y, imgW, imgH);
|
cr->rectangle(tl.x, tl.y, imgW, imgH);
|
||||||
cr->fill();
|
cr->fill();
|
||||||
|
@@ -205,7 +205,7 @@ void LWButton::redraw (Cairo::RefPtr<Cairo::Context> context)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (icon) {
|
if (icon) {
|
||||||
context->set_source (icon->surface, xpos + dilat, ypos + dilat);
|
context->set_source (icon->get(), xpos + dilat, ypos + dilat);
|
||||||
context->paint ();
|
context->paint ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -28,15 +28,17 @@
|
|||||||
#include <giomm.h>
|
#include <giomm.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <tiffio.h>
|
#include <tiffio.h>
|
||||||
#include "rtwindow.h"
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
#include "../rtengine/profilestore.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "soundman.h"
|
#include "soundman.h"
|
||||||
#include "rtimage.h"
|
#include "rtimage.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
#include "extprog.h"
|
#include "extprog.h"
|
||||||
|
#include "pathutils.h"
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include <glibmm/fileutils.h>
|
#include <glibmm/fileutils.h>
|
||||||
@@ -44,6 +46,8 @@
|
|||||||
#include <glib/gstdio.h>
|
#include <glib/gstdio.h>
|
||||||
#include <glibmm/threads.h>
|
#include <glibmm/threads.h>
|
||||||
#else
|
#else
|
||||||
|
#include <windows.h>
|
||||||
|
#include <shlobj.h>
|
||||||
#include <glibmm/thread.h>
|
#include <glibmm/thread.h>
|
||||||
#include "conio.h"
|
#include "conio.h"
|
||||||
#endif
|
#endif
|
||||||
|
@@ -132,3 +132,8 @@ bool RTSurface::hasSurface() const
|
|||||||
{
|
{
|
||||||
return surface ? true : false;
|
return surface ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const Cairo::RefPtr<Cairo::ImageSurface>& RTSurface::get() const
|
||||||
|
{
|
||||||
|
return surface;
|
||||||
|
}
|
||||||
|
@@ -26,12 +26,15 @@
|
|||||||
*/
|
*/
|
||||||
class RTSurface : public RTScalable
|
class RTSurface : public RTScalable
|
||||||
{
|
{
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
static double dpiBack; // used to keep track of master dpi change
|
static double dpiBack; // used to keep track of master dpi change
|
||||||
static int scaleBack; // used to keep track of master scale change
|
static int scaleBack; // used to keep track of master scale change
|
||||||
|
Cairo::RefPtr<Cairo::ImageSurface> surface;
|
||||||
void changeImage (Glib::ustring imageName);
|
void changeImage (Glib::ustring imageName);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Cairo::RefPtr<Cairo::ImageSurface> surface;
|
|
||||||
|
|
||||||
RTSurface ();
|
RTSurface ();
|
||||||
RTSurface (const RTSurface& other);
|
RTSurface (const RTSurface& other);
|
||||||
@@ -42,6 +45,8 @@ public:
|
|||||||
int getHeight() const;
|
int getHeight() const;
|
||||||
bool hasSurface() const;
|
bool hasSurface() const;
|
||||||
|
|
||||||
|
const Cairo::RefPtr<Cairo::ImageSurface>& get() const;
|
||||||
|
|
||||||
static void init();
|
static void init();
|
||||||
static void updateImages ();
|
static void updateImages ();
|
||||||
static void setDPInScale (const double newDPI, const int newScale);
|
static void setDPInScale (const double newDPI, const int newScale);
|
||||||
|
Reference in New Issue
Block a user