diff --git a/rtengine/iptransform.cc b/rtengine/iptransform.cc index ef175a511..43284a257 100644 --- a/rtengine/iptransform.cc +++ b/rtengine/iptransform.cc @@ -525,10 +525,10 @@ void ImProcFunctions::transformLuminanceOnly (Imagefloat* original, Imagefloat* for (int y=0; yheight; y++) { double vig_y_d = (double) (y + cy) - vig_h2 ; for (int x=0; xwidth; x++) { - double vig_x_d = (double) (x + cx) - vig_w2 ; - double r = sqrt(vig_x_d*vig_x_d + vig_y_d*vig_y_d); double factor = 1.0; if (applyVignetting) { + double vig_x_d = (double) (x + cx) - vig_w2 ; + double r = sqrt(vig_x_d*vig_x_d + vig_y_d*vig_y_d); if(darkening) factor /= std::max(v + mul * tanh (b*(maxRadius-r) / maxRadius), 0.001); else diff --git a/rtexif/sonyminoltaattribs.cc b/rtexif/sonyminoltaattribs.cc index 7c0059186..bfcb7d35c 100644 --- a/rtexif/sonyminoltaattribs.cc +++ b/rtexif/sonyminoltaattribs.cc @@ -860,7 +860,10 @@ class SALensIDInterpreter : public IntLensInterpreter< int > { double *liArray = NULL; if (lensInfoTag) liArray = lensInfoTag->toDoubleArray(); - return guess( lensID, focalLength, maxApertureAtFocal, liArray); + std::string retval = guess( lensID, focalLength, maxApertureAtFocal, liArray); + if(liArray) + delete [] liArray; + return retval; } }; SALensIDInterpreter saLensIDInterpreter; diff --git a/rtgui/options.h b/rtgui/options.h index 53b5e7e5f..842d4fc9c 100644 --- a/rtgui/options.h +++ b/rtgui/options.h @@ -38,18 +38,19 @@ // Profile name to use for internal values' profile #define DEFPROFILE_INTERNAL "Neutral" -class SaveFormat { - - public: - Glib::ustring format; - int pngBits; - int pngCompression; - int jpegQuality; - int jpegSubSamp; // 1=best compression, 3=best quality - int tiffBits; - bool tiffUncompressed; - bool saveParams; -}; +class SaveFormat { + + public: + Glib::ustring format; + int pngBits; + int pngCompression; + int jpegQuality; + int jpegSubSamp; // 1=best compression, 3=best quality + int tiffBits; + bool tiffUncompressed; + bool saveParams; + SaveFormat () : format("jpg"), jpegQuality(90), jpegSubSamp(2), pngCompression(6), pngBits(8), tiffBits(8), tiffUncompressed(true), saveParams(true) {}; +}; enum ThFileType {FT_Invalid=-1, FT_None=0, FT_Raw=1, FT_Jpeg=2, FT_Tiff=3, FT_Png=4, FT_Custom=5, FT_Tiff16=6, FT_Png16=7, FT_Custom16=8}; enum PPLoadLocation {PLL_Cache=0, PLL_Input=1};