Hello community, here is the log from the commit of package darktable for openSUSE:Factory checked in at 2017-04-06 11:02:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/darktable (Old) and /work/SRC/openSUSE:Factory/.darktable.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "darktable" Thu Apr 6 11:02:33 2017 rev:67 rq:484803 version:2.2.4 Changes: -------- --- /work/SRC/openSUSE:Factory/darktable/darktable.changes 2017-02-03 17:35:20.952674263 +0100 +++ /work/SRC/openSUSE:Factory/.darktable.new/darktable.changes 2017-04-06 11:02:34.747946276 +0200 @@ -1,0 +2,41 @@ +Mon Apr 3 08:08:36 UTC 2017 - [email protected] + +- update to 2.2.4 + - New features: + - Better brush trace handing of opacity to get better control. + - tools: Add script to purge stale thumbnails + - tools: A script to watch a folder for new images + - Bugfixes: + - DNG: fix camera name demangling. It used to report some wrong + name for some cameras. + - When using wayland, prefer XWayland, because native Wayland + support is not fully functional yet + - EXIF: properly handle image orientation '2' and '4' (swap + them) + - OpenCL: a few fixes in profiled denoise, demosaic and + colormapping + - tiling: do not process uselessly small end tiles + - masks: avoid assertion failure in early phase of path + generation, + - masks: reduce risk of unwanted self-finalization of small + path shapes + - Fix rare issue when expanding $() variables in import/export + string + - Camera import: fix ignore_jpg setting not having an effect + - Picasa web exporter: unbreak after upstream API change + - collection: fix query string for folders ( 'a' should match + 'a/b' and 'a/c', but not 'ac/' ) + - Base Support: + - Fujifilm X-T20 (only uncompressed raw, at the moment) + - Fujifilm X100F (only uncompressed raw, at the moment) + - Nikon COOLPIX B700 (12bit-uncompressed) + - Olympus E-M1MarkII + - Panasonic DMC-TZ61 (4:3, 3:2, 1:1, 16:9) + - Panasonic DMC-ZS40 (4:3, 3:2, 1:1, 16:9) + - Sony ILCE-6500 + - Noise Profiles: + - Canon PowerShot G7 X Mark II + - Olympus E-M1MarkII + - Lge Nexus 5X + +------------------------------------------------------------------- Old: ---- darktable-2.2.3.tar.xz New: ---- darktable-2.2.4.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ darktable.spec ++++++ --- /var/tmp/diff_new_pack.GwWudS/_old 2017-04-06 11:02:36.279729781 +0200 +++ /var/tmp/diff_new_pack.GwWudS/_new 2017-04-06 11:02:36.279729781 +0200 @@ -47,7 +47,7 @@ %define cmake_options -DCMAKE_SKIP_RPATH:BOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBINARY_PACKAGE_BUILD=1 -DCMAKE_INSTALL_DATAROOTDIR="share" -DCMAKE_INSTALL_LIBDIR="%{_lib}" Name: darktable -Version: 2.2.3 +Version: 2.2.4 Release: 0 Url: http://www.darktable.org/ Source0: %{name}-%{version}.tar.xz ++++++ darktable-2.2.3.tar.xz -> darktable-2.2.4.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/darktable-2.2.3/CMakeLists.txt new/darktable-2.2.4/CMakeLists.txt --- old/darktable-2.2.3/CMakeLists.txt 2017-01-31 10:39:17.000000000 +0100 +++ new/darktable-2.2.4/CMakeLists.txt 2017-04-01 20:27:39.000000000 +0200 @@ -203,7 +203,7 @@ else(NOT SOURCE_PACKAGE) if(NOT EXISTS ${CMAKE_SOURCE_DIR}/src/version_gen.c) # should be expanded by git archive due to export-subst in .gitattributes - set(PROJECT_VERSION "archive-1b9ceb77d9b7b4bcbd7c5aee1c9cc3ffb353252e") + set(PROJECT_VERSION "archive-3a8aa201e55cf29092b4503bb5198c410d62e68d") # but was it expanded? if(PROJECT_VERSION MATCHES Format) set(PROJECT_VERSION "unknown-version") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/darktable-2.2.3/RELEASE_NOTES new/darktable-2.2.4/RELEASE_NOTES --- old/darktable-2.2.3/RELEASE_NOTES 2017-01-31 10:39:17.000000000 +0100 +++ new/darktable-2.2.4/RELEASE_NOTES 2017-04-01 20:27:39.000000000 +0200 @@ -1,18 +1,48 @@ -we're proud to announce the third bugfix release for the 2.2 series of darktable, 2.2.3! +we're proud to announce the fourth bugfix release for the 2.2 series of darktable, 2.2.4! as always, please don't use the autogenerated tarball provided by github, but only our tar.xz. the checksum is: - $ sha256sum darktable-2.2.3.tar.xz - ??? darktable-2.2.3.tar.xz - $ sha256sum darktable-2.2.3.dmg - ??? darktable-2.2.3.dmg + $ sha256sum darktable-2.2.4.tar.xz + ??? darktable-2.2.4.tar.xz + $ sha256sum darktable-2.2.4.dmg + ??? darktable-2.2.4.dmg #### Important note: to make sure that darktable can keep on supporting the raw file format for your camera, please help us by visiting https://raw.pixls.us/ and making sure that we have the full raw sample set for your camera under CC0 license! -and the changelog as compared to 2.2.2 can be found below. +and the changelog as compared to 2.2.3 can be found below. + +## New features: + +- Better brush trace handing of opacity to get better control. +- tools: Add script to purge stale thumbnails +- tools: A script to watch a folder for new images ## Bugfixes: -- Fix fatal crash when generating preview for medium megapixel count (~16MP) Bayer images -- Propely subtract black levels: respect the even/odd -ness of the raw crop origin point -- Collection module: fix a few ui quirks +- DNG: fix camera name demangling. It used to report some wrong name for some cameras. +- When using wayland, prefer XWayland, because native Wayland support is not fully functional yet +- EXIF: properly handle image orientation '2' and '4' (swap them) +- OpenCL: a few fixes in profiled denoise, demosaic and colormapping +- tiling: do not process uselessly small end tiles +- masks: avoid assertion failure in early phase of path generation, +- masks: reduce risk of unwanted self-finalization of small path shapes +- Fix rare issue when expanding $() variables in import/export string +- Camera import: fix ignore_jpg setting not having an effect +- Picasa web exporter: unbreak after upstream API change +- collection: fix query string for folders ( 'a' should match 'a/b' and 'a/c', but not 'ac/' ) + +## Base Support: + +- Fujifilm X-T20 (only uncompressed raw, at the moment) +- Fujifilm X100F (only uncompressed raw, at the moment) +- Nikon COOLPIX B700 (12bit-uncompressed) +- Olympus E-M1MarkII +- Panasonic DMC-TZ61 (4:3, 3:2, 1:1, 16:9) +- Panasonic DMC-ZS40 (4:3, 3:2, 1:1, 16:9) +- Sony ILCE-6500 + +## Noise Profiles: + +- Canon PowerShot G7 X Mark II +- Olympus E-M1MarkII +- Lge Nexus 5X diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/darktable-2.2.3/data/kernels/demosaic_vng.cl new/darktable-2.2.4/data/kernels/demosaic_vng.cl --- old/darktable-2.2.3/data/kernels/demosaic_vng.cl 2017-01-31 10:39:17.000000000 +0100 +++ new/darktable-2.2.4/data/kernels/demosaic_vng.cl 2017-04-01 20:27:39.000000000 +0200 @@ -30,7 +30,7 @@ } kernel void -vng_border_interpolate(read_only image2d_t in, write_only image2d_t out, const int width, const int height, +vng_border_interpolate(read_only image2d_t in, write_only image2d_t out, const int width, const int height, const int border, const int r_x, const int r_y, const unsigned int filters, global const unsigned char (*const xtrans)[6]) { const int x = get_global_id(0); @@ -39,7 +39,6 @@ if(x >= width || y >= height) return; const int colors = (filters == 9) ? 3 : 4; - const int border = 2; const int avgwindow = 1; if(x >= border && x < width-border && y >= border && y < height-border) return; @@ -271,7 +270,7 @@ for(int c = 0; c < colors; c++) { - if(c == color && offset1) + if(c == color && (idx1 + c1)) { sum[c] += (buffer[c] + buffer[idx1 + c1]) * 0.5f; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/darktable-2.2.3/data/noiseprofiles.json new/darktable-2.2.4/data/noiseprofiles.json --- old/darktable-2.2.3/data/noiseprofiles.json 2017-01-31 10:39:17.000000000 +0100 +++ new/darktable-2.2.4/data/noiseprofiles.json 2017-04-01 20:27:39.000000000 +0200 @@ -197,6 +197,33 @@ ] }, { + "comment": "powershot g7 x mark ii contributed by mariano", + "model": "PowerShot G7 X Mark II", + "profiles": [ + {"name": "PowerShot G7 X Mark II iso 125", "iso": 125, "a": [1.06935133377294e-05, 1.00550358890388e-05, 4.13826960261977e-05], "b": [2.12312093053528e-08, -1.62220882963983e-08, -6.43505084400269e-09]}, + {"name": "PowerShot G7 X Mark II iso 160", "iso": 160, "a": [1.41924958180789e-05, 1.12890228293744e-05, 4.57364966213153e-05], "b": [1.17944487227951e-08, 1.20181565749208e-08, 4.87935359794542e-08]}, + {"name": "PowerShot G7 X Mark II iso 200", "iso": 200, "a": [1.6019548250256e-05, 1.35368424441407e-05, 5.49895799699785e-05], "b": [2.21538321747858e-08, 6.10681799492254e-09, 6.03149474029967e-08]}, + {"name": "PowerShot G7 X Mark II iso 250", "iso": 250, "a": [1.88625087245583e-05, 1.62907844339081e-05, 6.73318044584856e-05], "b": [5.6456340188443e-08, 2.91054465018343e-08, 9.7334472038177e-08]}, + {"name": "PowerShot G7 X Mark II iso 320", "iso": 320, "a": [2.34349678079496e-05, 2.01449876769379e-05, 6.84283107580354e-05], "b": [9.00745437394801e-08, 5.64859745530566e-08, 2.11337921311363e-07]}, + {"name": "PowerShot G7 X Mark II iso 400", "iso": 400, "a": [5.6911440279177e-05, 2.24852582291037e-05, 3.48988851758936e-05], "b": [-1.17742962658112e-07, 4.28238195298461e-08, 1.94726473118584e-07]}, + {"name": "PowerShot G7 X Mark II iso 500", "iso": 500, "a": [6.99856544228826e-05, 2.78278722081667e-05, 4.30933772072822e-05], "b": [-2.18499716445543e-07, 6.01365337752333e-08, 2.81839641620175e-07]}, + {"name": "PowerShot G7 X Mark II iso 640", "iso": 640, "a": [8.55171244683898e-05, 3.40648750480151e-05, 5.45629410704495e-05], "b": [-9.84857479078553e-08, 1.19499389863408e-07, 3.17166864272111e-07]}, + {"name": "PowerShot G7 X Mark II iso 800", "iso": 800, "a": [8.7295839268937e-05, 3.97762405610494e-05, 5.09359123186171e-05], "b": [-6.63535066849235e-08, 1.7555412672144e-07, 5.62879836831656e-07]}, + {"name": "PowerShot G7 X Mark II iso 1000", "iso": 1000, "a": [0.000141929023993355, 5.44470621868961e-05, 7.40270360562961e-05], "b": [-2.9169720976641e-07, 2.04989457987547e-07, 6.05792781159337e-07]}, + {"name": "PowerShot G7 X Mark II iso 1250", "iso": 1250, "a": [0.000162856305258218, 6.95756802056634e-05, 0.000112273901348038], "b": [-1.30457948717608e-07, 2.59381393813685e-07, 6.31868796737214e-07]}, + {"name": "PowerShot G7 X Mark II iso 1600", "iso": 1600, "a": [8.9869180641876e-05, 8.12181591789464e-05, 0.00037039898069506], "b": [8.83892299062382e-07, 2.7435604894914e-07, 9.86964270431402e-08]}, + {"name": "PowerShot G7 X Mark II iso 2000", "iso": 2000, "a": [0.000112062548407812, 9.95732435584513e-05, 0.000362506795126356], "b": [1.34204332451866e-06, 5.29302362111498e-07, 2.63202934020444e-06]}, + {"name": "PowerShot G7 X Mark II iso 2500", "iso": 2500, "a": [0.000141471208039253, 0.000123258930290636, 0.00053838192930081], "b": [1.24285899115696e-06, 7.6501504971041e-07, 9.73786653812927e-07]}, + {"name": "PowerShot G7 X Mark II iso 3200", "iso": 3200, "a": [0.000183015334304001, 0.000154323757995835, 0.000698875446552585], "b": [1.42367305014125e-06, 1.88744924849388e-06, 5.10875051792612e-06]}, + {"name": "PowerShot G7 X Mark II iso 4000", "iso": 4000, "a": [0.000274054142962489, 0.000195518271899586, 0.000614438186199257], "b": [1.27524568623463e-06, 1.88620193284058e-06, 6.34959530263886e-06]}, + {"name": "PowerShot G7 X Mark II iso 5000", "iso": 5000, "a": [0.000286501534227043, 0.000240680090527953, 5.68848260215146e-05], "b": [6.8373416327802e-06, 2.9787127831731e-06, 4.90992869072545e-05]}, + {"name": "PowerShot G7 X Mark II iso 6400", "iso": 6400, "a": [0.000331255172605134, 0.000297108210639488, 0.00133601209104009], "b": [8.66110421116362e-06, 5.21013663033006e-06, 1.35819715828872e-06]}, + {"name": "PowerShot G7 X Mark II iso 8000", "iso": 8000, "a": [0.00110689236968198, 0.000401836070762736, 0.000505535475596215], "b": [2.13798536789686e-06, 4.66954155211054e-06, 4.20369449483539e-06]}, + {"name": "PowerShot G7 X Mark II iso 10000", "iso": 10000, "a": [0.000672674586355028, 0.000611624042729493, 0.00179572484717187], "b": [4.95726593098577e-06, 3.50617989536728e-06, 2.31662821686309e-06]}, + {"name": "PowerShot G7 X Mark II iso 12800", "iso": 12800, "a": [0.00172832884019693, 0.000647089726943206, 0.000851192081451353], "b": [4.63571678267481e-06, 9.30747700171677e-06, 7.42848348404348e-06]} + ] + }, + { "comment": "eos 1200d contributed by aitatxoborja", "model": "EOS 1200D", "profiles": [ @@ -3016,7 +3043,22 @@ {"name": "E-M10MarkII iso 12800", "iso": 12800, "a": [0.000481645929928644, 0.00019163744252251, 0.000362326729576843], "b": [2.38746195987496e-06, 2.2508533772738e-06, 2.68981097675674e-06]}, {"name": "E-M10MarkII iso 25600", "iso": 25600, "a": [0.000993794684356688, 0.000404854394329772, 0.000759301032073675], "b": [5.40625299417711e-06, 5.72061095738384e-06, 6.53536538330311e-06]} ] + }, + { + "comment": "Olympus OM-D E-M1 Mk.II profiled by Dawid Loubser ([email protected])", + "model": "E-M1MarkII", + "profiles": [ + {"name": "E-M1MarkII iso 64", "iso": 64, "a": [6.03448971452101e-06, 3.34702089057382e-06, 7.96405397670638e-06], "b": [5.64107208449212e-09, -2.5739502568846e-09, 3.54038442599048e-09]}, + {"name": "E-M1MarkII iso 200", "iso": 200, "a": [6.13709922433744e-06, 3.54055600967237e-06, 8.11208952906179e-06], "b": [8.96247561553474e-09, 5.87516750118224e-09, 7.9760196090394e-09]}, + {"name": "E-M1MarkII iso 400", "iso": 400, "a": [1.1277313652014e-05, 6.30341903686042e-06, 1.41886067124167e-05], "b": [1.54555312163237e-08, 7.06721019161393e-09, 1.48892314882207e-08]}, + {"name": "E-M1MarkII iso 800", "iso": 800, "a": [2.11892459998804e-05, 1.12541173528155e-05, 2.56595516307882e-05], "b": [4.04565499925071e-08, 2.69246669230953e-08, 4.18664327519833e-08]}, + {"name": "E-M1MarkII iso 1600", "iso": 1600, "a": [4.22953887838241e-05, 2.14948866100995e-05, 4.90974948586661e-05], "b": [8.22142492924679e-08, 6.15912238619032e-08, 8.30371607130872e-08]}, + {"name": "E-M1MarkII iso 3200", "iso": 3200, "a": [8.09094889300661e-05, 4.03657735201826e-05, 9.11000593033239e-05], "b": [1.54850201636701e-07, 1.06491270486505e-07, 1.4547431044408e-07]}, + {"name": "E-M1MarkII iso 6400", "iso": 6400, "a": [0.000162818243811292, 7.66465569572085e-05, 0.000189807939134868], "b": [3.4511459701267e-07, 2.72253170538817e-07, 3.08685445026257e-07]}, + {"name": "E-M1MarkII iso 12800", "iso": 12800, "a": [0.000341007611560922, 0.000170115910815632, 0.000400188562023328], "b": [7.56753327460077e-07, 7.05251299439448e-07, 6.39453192395373e-07]} + ] } + ] }, { @@ -5010,6 +5052,20 @@ {"name": "Nexus 5 iso 3200", "iso": 3200, "a": [0.000753506842617197, 0.000424195799109644, 0.000858423239661108], "b": [1.42802529339895e-05, 1.26551608653164e-05, 2.19708111759326e-05]}, {"name": "Nexus 5 iso 3200", "iso": 3200, "a": [0.000778248212852919, 0.000442218441209912, 0.000922519536168604], "b": [1.15050395187219e-05, 1.01305383004307e-05, 1.47053958885876e-05]} ] + }, + { + "comment": "nexus 5x contributed by Sarge Borsch", + "model": "Nexus 5X", + "profiles": [ + {"name": "Nexus 5X iso 60", "iso": 60, "a": [2.18724635440073e-05, 1.05557509586381e-05, 2.06856905853928e-05], "b": [1.66052028312972e-07, 9.55635978146247e-08, 2.00820204265458e-07]}, + {"name": "Nexus 5X iso 100", "iso": 100, "a": [3.40037933785799e-05, 1.64386562440801e-05, 3.23603320119039e-05], "b": [2.17459848749609e-07, 1.9450004472537e-07, 2.59733402750644e-07]}, + {"name": "Nexus 5X iso 200", "iso": 200, "a": [6.29609122488214e-05, 3.02968380048786e-05, 6.15246579645498e-05], "b": [3.31339234517216e-07, 2.83081712707222e-07, 3.93992944328725e-07]}, + {"name": "Nexus 5X iso 400", "iso": 400, "a": [0.000118920163604622, 5.97975508195949e-05, 0.000119072369570844], "b": [7.71584902760329e-07, 5.85259579504233e-07, 9.56146452102493e-07]}, + {"name": "Nexus 5X iso 800", "iso": 800, "a": [0.000241967004742726, 0.000117212911979214, 0.000241787205831078], "b": [1.6279879300964e-06, 1.53288956902416e-06, 1.82003808803681e-06]}, + {"name": "Nexus 5X iso 1600", "iso": 1600, "a": [0.000467007215178577, 0.000243549545744982, 0.000530478244134115], "b": [5.75436620025903e-06, 5.07053069187935e-06, 5.39069574574747e-06]}, + {"name": "Nexus 5X iso 3200", "iso": 3200, "a": [0.00115094104008652, 0.000634412731636041, 0.0013788980751907], "b": [1.27209242215343e-05, 1.31560010627531e-05, 1.03411585308139e-05]}, + {"name": "Nexus 5X iso 6400", "iso": 6400, "a": [0.00253880463939591, 0.00145105495305212, 0.00290179438260641], "b": [4.03830971306487e-05, 4.46765040219689e-05, 3.37034893542611e-05]} + ] } ] }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/darktable-2.2.3/data/noiseprofiles.schema new/darktable-2.2.4/data/noiseprofiles.schema --- old/darktable-2.2.3/data/noiseprofiles.schema 2017-01-31 10:39:17.000000000 +0100 +++ new/darktable-2.2.4/data/noiseprofiles.schema 2017-04-01 20:27:39.000000000 +0200 @@ -49,7 +49,7 @@ "type": "string", "pattern": "^[a-zA-Z0-9\\- \\*]+$", "minLength": 2, - "maxLength": 18 + "maxLength": 22 }, "profiles": { "type": "array", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/darktable-2.2.3/src/common/collection.c new/darktable-2.2.4/src/common/collection.c --- old/darktable-2.2.3/src/common/collection.c 2017-01-31 10:39:17.000000000 +0100 +++ new/darktable-2.2.4/src/common/collection.c 2017-04-01 20:27:39.000000000 +0200 @@ -831,8 +831,9 @@ break; case DT_COLLECTION_PROP_FOLDERS: // folders - query = dt_util_dstrcat(query, "(film_id IN (SELECT id FROM main.film_rolls WHERE folder LIKE '%s%%'))", - escaped_text); + query = dt_util_dstrcat( + query, "(film_id IN (SELECT id FROM main.film_rolls WHERE folder LIKE '%1$s' OR folder LIKE '%1$s/%%'))", + escaped_text); break; case DT_COLLECTION_PROP_COLORLABEL: // colorlabel diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/darktable-2.2.3/src/common/darktable.c new/darktable-2.2.4/src/common/darktable.c --- old/darktable-2.2.3/src/common/darktable.c 2017-01-31 10:39:17.000000000 +0100 +++ new/darktable-2.2.4/src/common/darktable.c 2017-04-01 20:27:39.000000000 +0200 @@ -721,7 +721,15 @@ // we need this REALLY early so that error messages can be shown if(init_gui) + { +#ifdef GDK_WINDOWING_WAYLAND + // There are currently bad interactions with Wayland (drop-downs + // are very narrow, scroll events lost). Until this is fixed, give + // priority to the XWayland backend for Wayland users. + gdk_set_allowed_backends("x11,*"); +#endif gtk_init(&argc, &argv); + } #ifdef _OPENMP omp_set_num_threads(darktable.num_openmp_threads); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/darktable-2.2.3/src/common/image.h new/darktable-2.2.4/src/common/image.h --- old/darktable-2.2.3/src/common/image.h 2017-01-31 10:39:17.000000000 +0100 +++ new/darktable-2.2.4/src/common/image.h 2017-04-01 20:27:39.000000000 +0200 @@ -247,11 +247,11 @@ case 1: return ORIENTATION_NONE; case 2: - return ORIENTATION_FLIP_VERTICALLY; + return ORIENTATION_FLIP_HORIZONTALLY; case 3: return ORIENTATION_ROTATE_180_DEG; case 4: - return ORIENTATION_FLIP_HORIZONTALLY; + return ORIENTATION_FLIP_VERTICALLY; case 5: return ORIENTATION_400; // ??? case 6: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/darktable-2.2.3/src/common/variables.c new/darktable-2.2.4/src/common/variables.c --- old/darktable-2.2.3/src/common/variables.c 2017-01-31 10:39:17.000000000 +0100 +++ new/darktable-2.2.4/src/common/variables.c 2017-04-01 20:27:39.000000000 +0200 @@ -39,59 +39,26 @@ guint sequence; } dt_variables_data_t; -gchar *_string_get_first_variable(gchar *string, gchar *variable) +gchar *_string_get_next_variable(gchar *string, gchar *variable, const size_t variable_size) { - if(g_strrstr(string, "$(")) - { - gchar *pend = string + strlen(string); - gchar *p, *e; - p = e = string; - while(p < pend && e < pend) - { - while(*p != '$' && *(p + 1) != '(' && p < pend) p++; - if(*p == '$' && *(p + 1) == '(') - { - e = p; - while(*e != ')' && e < pend) e++; - if(e < pend && *e == ')') - { - strncpy(variable, p, e - p + 1); - variable[e - p + 1] = '\0'; - return p + 1; - } - else - return NULL; - } - p++; - } - return p + 1; - } - return NULL; -} - -gchar *_string_get_next_variable(gchar *string, gchar *variable) -{ - gchar *pend = string + strlen(string); - gchar *p, *e; - p = e = string; - while(p < pend && e < pend) - { - while(!(*p == '$' && *(p + 1) == '(') && p <= pend) p++; - if(*p == '$' && *(p + 1) == '(') - { - e = p; - while(*e != ')' && e < pend) e++; - if(e < pend && *e == ')') - { - strncpy(variable, p, e - p + 1); - variable[e - p + 1] = '\0'; - return p + 1; - } - else - return NULL; - } - } - return NULL; + // initiate empty output variable + *variable = '\0'; + gchar *end = NULL; + gchar *start = g_strstr_len(string, -1, "$("); + if(start) + { + end = g_strstr_len(start, variable_size, ")"); + if(end) + { + // we want to include ')' + end++; + const int length = end - start + 1; + g_strlcpy(variable, start, MIN(length, variable_size)); + } + } + // fprintf(stderr, "_string_get_next_variable: splitted %s in variable %s and remainder %s\n", string, variable, + // end); + return end; } gboolean _variable_get_value(dt_variables_params_t *params, gchar *variable, gchar *value, size_t value_len) @@ -110,6 +77,7 @@ else pictures_folder = g_strdup(g_get_user_special_dir(G_USER_DIRECTORY_PICTURES)); + // fprintf(stderr, "pictures_folder: %s\n", pictures_folder); if(params->filename) { file_ext = (g_strrstr(params->filename, ".") + 1); @@ -351,38 +319,44 @@ gboolean dt_variables_expand(dt_variables_params_t *params, gchar *string, gboolean iterate) { - gchar *variable = g_malloc(128); + static const size_t variable_size = 128; + gchar *variable = g_malloc(variable_size); gchar *value = g_malloc_n(1024, sizeof(gchar)); - gchar *token = NULL; // Let's free previous expanded result if any... g_free(params->data->result); if(iterate) params->data->sequence++; - // Lets expand string - gchar *result = NULL; + // Lets expand the string params->data->result = params->data->source = string; - if((token = _string_get_first_variable(params->data->source, variable)) != NULL) - { - do - { - // fprintf(stderr,"var: %s\n",variable); - if(_variable_get_value(params, variable, value, 1024 * sizeof(gchar))) + + gchar *result = NULL; + gchar *remainingVariables = params->data->source; + gboolean success = FALSE; + while((remainingVariables = _string_get_next_variable(remainingVariables, variable, variable_size))) + { + if(_variable_get_value(params, variable, value, 1024 * sizeof(gchar))) + { + // fprintf(stderr, "Substitute variable '%s' with value '%s'\n", variable, value); + result = dt_util_str_replace(params->data->result, variable, value); + if(result != params->data->result && result != params->data->source) { - // fprintf(stderr,"Substitute variable '%s' with value '%s'\n",variable,value); - if((result = dt_util_str_replace(params->data->result, variable, value)) != params->data->result - && result != params->data->source) + // we got a result + if(params->data->result != params->data->source) { - // we got a result - if(params->data->result != params->data->source) g_free(params->data->result); - params->data->result = result; + g_free(params->data->result); } + params->data->result = result; + success = TRUE; } - } while((token = _string_get_next_variable(token, variable)) != NULL); + } } - else + + if(!success) + { params->data->result = g_strdup(string); + } g_free(variable); g_free(value); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/darktable-2.2.3/src/develop/masks/brush.c new/darktable-2.2.4/src/develop/masks/brush.c --- old/darktable-2.2.3/src/develop/masks/brush.c 2017-01-31 10:39:17.000000000 +0100 +++ new/darktable-2.2.4/src/develop/masks/brush.c 2017-04-01 20:27:39.000000000 +0200 @@ -24,6 +24,11 @@ #include "develop/imageop.h" #include "develop/masks.h" +#define CREATE_MAX_BRUSH_OPACITY 0.5f +// the maximum opacity when drawing a mask, this is to let see through it for better control +#define CREATE_MAX_TRACE_OPACITY 0.8f +// like above but for the trace + /** get squared distance of indexed point to line segment, taking weighted payload data into account */ static float _brush_point_line_distance2(int index, int pointscount, const float *points, const float *payload) { @@ -2089,7 +2094,7 @@ } cairo_save(cr); - cairo_set_source_rgba(cr, .8, .8, .8, masks_density); + cairo_set_source_rgba(cr, .8, .8, .8, masks_density * CREATE_MAX_BRUSH_OPACITY); cairo_arc(cr, xpos, ypos, radius1, 0, 2.0 * M_PI); cairo_fill_preserve(cr); cairo_set_source_rgba(cr, .8, .8, .8, .8); @@ -2144,7 +2149,7 @@ opacity = oldopacity = masks_density; cairo_set_line_width(cr, 2 * radius); - cairo_set_source_rgba(cr, .1, .1, .1, opacity); + cairo_set_source_rgba(cr, .1, .1, .1, opacity * CREATE_MAX_TRACE_OPACITY); cairo_move_to(cr, guipoints[0], guipoints[1]); for(int i = 1; i < gui->guipoints_count; i++) @@ -2187,7 +2192,7 @@ cairo_stroke(cr); stroked = 1; cairo_set_line_width(cr, 2 * radius); - cairo_set_source_rgba(cr, .1, .1, .1, opacity); + cairo_set_source_rgba(cr, .1, .1, .1, opacity * CREATE_MAX_TRACE_OPACITY); oldradius = radius; oldopacity = opacity; cairo_move_to(cr, guipoints[i * 2], guipoints[i * 2 + 1]); @@ -2196,7 +2201,7 @@ if(!stroked) cairo_stroke(cr); cairo_set_line_width(cr, linewidth); - cairo_set_source_rgba(cr, .8, .8, .8, opacity); + cairo_set_source_rgba(cr, .8, .8, .8, opacity * CREATE_MAX_BRUSH_OPACITY); cairo_arc(cr, guipoints[2 * (gui->guipoints_count - 1)], guipoints[2 * (gui->guipoints_count - 1) + 1], radius, 0, 2.0 * M_PI); cairo_fill_preserve(cr); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/darktable-2.2.3/src/develop/masks/path.c new/darktable-2.2.4/src/develop/masks/path.c --- old/darktable-2.2.3/src/develop/masks/path.c 2017-01-31 10:39:17.000000000 +0100 +++ new/darktable-2.2.4/src/develop/masks/path.c 2017-04-01 20:27:39.000000000 +0200 @@ -342,6 +342,8 @@ /** find all self intersections in a path */ static int _path_find_self_intersection(dt_masks_dynbuf_t *inter, int nb_corners, float *border, int border_count) { + if(nb_corners == 0 || border_count == 0) return 0; + int inter_count = 0; // we search extreme points in x and y @@ -526,7 +528,7 @@ } } - intersections = dt_masks_dynbuf_init(10 * nb, "path intersections"); + intersections = dt_masks_dynbuf_init(10 * MAX(nb, 1), "path intersections"); if(intersections == NULL) { dt_masks_dynbuf_free(dpoints); @@ -1468,7 +1470,7 @@ int closeup = dt_control_get_dev_closeup(); float zoom_scale = dt_dev_get_zoom_scale(darktable.develop, zoom, closeup ? 2 : 1, 1); // centre view will have zoom_scale * backbuf_width pixels, we want the handle offset to scale with DPI: - const float as = DT_PIXEL_APPLY_DPI(15) / zoom_scale; // transformed to backbuf dimensions + const float as = DT_PIXEL_APPLY_DPI(5) / zoom_scale; // transformed to backbuf dimensions if(!gui) return 0; dt_masks_form_gui_points_t *gpt = (dt_masks_form_gui_points_t *)g_list_nth_data(gui->points, index); if(!gpt) return 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/darktable-2.2.3/src/develop/tiling.c new/darktable-2.2.4/src/develop/tiling.c --- old/darktable-2.2.3/src/develop/tiling.c 2017-01-31 10:39:17.000000000 +0100 +++ new/darktable-2.2.4/src/develop/tiling.c 2017-04-01 20:27:39.000000000 +0200 @@ -731,8 +731,8 @@ size_t wd = tx * tile_wd + width > roi_in->width ? roi_in->width - tx * tile_wd : width; size_t ht = ty * tile_ht + height > roi_in->height ? roi_in->height - ty * tile_ht : height; - /* no need to process end-tiles that are smaller than overlap */ - if((wd <= overlap && tx > 0) || (ht <= overlap && ty > 0)) continue; + /* no need to process end-tiles that are smaller than the total overlap area */ + if((wd <= 2 * overlap && tx > 0) || (ht <= 2 * overlap && ty > 0)) continue; /* origin and region of effective part of tile, which we want to store later */ size_t origin[] = { 0, 0, 0 }; @@ -1375,8 +1375,8 @@ size_t wd = tx * tile_wd + width > roi_in->width ? roi_in->width - tx * tile_wd : width; size_t ht = ty * tile_ht + height > roi_in->height ? roi_in->height - ty * tile_ht : height; - /* no need to process (end)tiles that are smaller than overlap */ - if((wd <= overlap && tx > 0) || (ht <= overlap && ty > 0)) continue; + /* no need to process (end)tiles that are smaller than the total overlap area */ + if((wd <= 2 * overlap && tx > 0) || (ht <= 2 * overlap && ty > 0)) continue; /* origin and region of effective part of tile, which we want to store later */ size_t origin[] = { 0, 0, 0 }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/darktable-2.2.3/src/external/adobe_coeff.c new/darktable-2.2.4/src/external/adobe_coeff.c --- old/darktable-2.2.3/src/external/adobe_coeff.c 2017-01-31 10:39:17.000000000 +0100 +++ new/darktable-2.2.4/src/external/adobe_coeff.c 2017-04-01 20:27:39.000000000 +0200 @@ -172,6 +172,7 @@ { "Fujifilm FinePix HS20EXR", { 13690,-5358,-1474,-3369,11600,1998,-132,1554,4395 } }, { "Fujifilm FinePix HS30EXR", { 13690,-5358,-1474,-3369,11600,1998,-132,1554,4395 } }, { "Fujifilm FinePix HS50EXR", { 12085,-4727,-953,-3257,11489,2002,-511,2046,4592 } }, + { "Fujifilm X100F", { 11434,-4948,-1210,-3746,12042,1903,-666,1479,5235 } }, { "Fujifilm X100T", { 10592,-4262,-1008,-3514,11355,2465,-870,2025,6386 } }, { "Fujifilm X100S", { 10592,-4262,-1008,-3514,11355,2465,-870,2025,6386 } }, { "Fujifilm FinePix X100", { 12161,-4457,-1069,-5034,12874,2400,-795,1724,6904 } }, @@ -189,6 +190,7 @@ { "Fujifilm X-M1", { 10413,-3996,-993,-3721,11640,2361,-733,1540,6011 } }, { "Fujifilm X-S1", { 13509,-6199,-1254,-4430,12733,1865,-331,1441,5022 } }, { "Fujifilm X-T10", { 8458,-2451,-855,-4597,12447,2407,-1475,2482,6526 } }, + { "Fujifilm X-T20", { 10592,-4262,-1008,-3514,11355,2465,-870,2025,6386 } }, { "Fujifilm X-T1", { 8458,-2451,-855,-4597,12447,2407,-1475,2482,6526 } }, { "Fujifilm X-T2", { 11434,-4948,-1210,-3746,12042,1903,-666,1479,5235 } }, { "Fujifilm XF1", { 13509,-6199,-1254,-4430,12733,1865,-331,1441,5022 } }, @@ -319,6 +321,7 @@ { "Nikon E8700", { 8489,-2583,-1036,-8051,15583,2643,-1307,1407,7354 } }, { "Nikon Coolpix E8800", { 7971,-2314,-913,-8451,15762,2894,-1442,1520,7610 } }, { "Nikon Coolpix A", { 8198,-2239,-724,-4871,12389,2798,-1043,2050,7181 } }, + { "Nikon COOLPIX B700", { 14387,-6014,-1299,-1357,9975,1616,467,1047,4744 } }, { "Nikon Coolpix P330", { 10321,-3920,-931,-2750,11146,1824,-442,1545,5539 } }, { "Nikon Coolpix P340", { 10321,-3920,-931,-2750,11146,1824,-442,1545,5539 } }, { "Nikon Coolpix P6000", { 9698,-3367,-914,-4706,12584,2368,-837,968,5801 } }, @@ -375,6 +378,7 @@ { "Olympus E-M10", { 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 } }, { "Olympus E-M10 Mark II", { 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 } }, { "Olympus E-M1", { 7687,-1984,-606,-4327,11928,2721,-1381,2339,6452 } }, + { "Olympus E-M1MarkII", { 9383,-3170,-763,-2457,10702,2020,-384,1236,5552 } }, { "Olympus E-M5 Mark II", { 9422,-3258,-711,-2655,10898,2015,-512,1354,5512 } }, { "Olympus E-M5", { 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 } }, { "Olympus PEN-F", { 9476,-3182,-765,-2613,10958,1893,-449,1315,5268 } }, @@ -487,6 +491,7 @@ { "Panasonic DMC-GX8", { 7564,-2263,-606,-3148,11239,2177,-540,1435,4853 } }, { "Panasonic DMC-GX85", { 7771,-3020,-629,-4029,11950,2345,-821,1977,6119 } }, { "Panasonic DMC-TZ60", { 8607,-2822,-808,-3755,11930,2049,-820,2060,5224 } }, + { "Panasonic DMC-TZ61", { 8607,-2822,-808,-3755,11930,2049,-820,2060,5224 } }, { "Panasonic DMC-TZ71", { 8802,-3135,-789,-3151,11468,1904,-550,1745,4810 } }, { "Panasonic DMC-TZ100", { 7790,-2736,-755,-3452,11870,1769,-628,1647,4898 } }, { "Phase One H 20", { 1313,1855,-109,-6715,15908,808,-327,1840,6020 } }, /* DJC */ @@ -573,6 +578,7 @@ { "Sony ILCE-5100", { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, { "Sony ILCE-6000", { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, { "Sony ILCE-6300", { 5973,-1695,-419,-3826,11797,2293,-639,1398,5789 } }, + { "Sony ILCE-6500", { 5973,-1695,-419,-3826,11797,2293,-639,1398,5789 } }, { "Sony NEX-5N", { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, { "Sony NEX-5R", { 6129,-1545,-418,-4930,12490,2743,-977,1693,6615 } }, { "Sony NEX-5T", { 6129,-1545,-418,-4930,12490,2743,-977,1693,6615 } }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/darktable-2.2.3/src/external/rawspeed/RawSpeed/CameraMetaData.cpp new/darktable-2.2.4/src/external/rawspeed/RawSpeed/CameraMetaData.cpp --- old/darktable-2.2.3/src/external/rawspeed/RawSpeed/CameraMetaData.cpp 2017-01-31 10:39:17.000000000 +0100 +++ new/darktable-2.2.4/src/external/rawspeed/RawSpeed/CameraMetaData.cpp 2017-04-01 20:27:39.000000000 +0200 @@ -1,5 +1,6 @@ #include "StdAfx.h" #include "CameraMetaData.h" +#include <algorithm> /* RawSpeed - RAW file decoder. @@ -50,47 +51,54 @@ } CameraMetaData::~CameraMetaData(void) { - map<string, Camera*>::iterator i = cameras.begin(); + std::map<CameraId, Camera*>::iterator i = cameras.begin(); for (; i != cameras.end(); ++i) { delete((*i).second); } } -static inline string getId(string make, string model, string mode) -{ +static inline CameraId getId(string make, string model, string mode) { TrimSpaces(make); TrimSpaces(model); TrimSpaces(mode); - return string(make).append(model).append(mode); + CameraId id; + id.make = make; + id.model = model; + id.mode = mode; + + return id; } -static inline string getId(Camera* cam) +static inline CameraId getId(Camera* cam) { return getId(cam->make, cam->model, cam->mode); } Camera* CameraMetaData::getCamera(string make, string model, string mode) { - string id = getId(make, model, mode); - if (cameras.end() == cameras.find(id)) - return NULL; - return cameras[id]; + auto camera = + cameras.find(getId(std::move(make), std::move(model), std::move(mode))); + return camera == cameras.end() ? nullptr : camera->second; } Camera* CameraMetaData::getCamera(string make, string model) { - string id = getId(make, model, ""); + auto id = getId(std::move(make), std::move(model), ""); - // do a prefix match, i.e. the make and model match, but not mode. - std::map<string,Camera*>::iterator iter = cameras.lower_bound(id); + auto iter = find_if(cameras.begin(), cameras.end(), + [id](decltype(*cameras.begin())& i) -> bool { + const auto cid = i.first; + return tie(id.make, id.model) == + tie(cid.make, cid.model); + }); - if (iter == cameras.find(id)) - return NULL; + if (iter == cameras.end()) + return nullptr; - return cameras[iter->first]; + return iter->second; } bool CameraMetaData::hasCamera(string make, string model, string mode) { - string id = getId(make, model, mode); + CameraId id = getId(make, model, mode); if (cameras.end() == cameras.find(id)) return FALSE; return TRUE; @@ -108,7 +116,7 @@ bool CameraMetaData::addCamera( Camera* cam ) { - string id = getId(cam); + CameraId id = getId(cam); if (cameras.end() != cameras.find(id)) { writeLog(DEBUG_PRIO_WARNING, "CameraMetaData: Duplicate entry found for camera: %s %s, Skipping!\n", cam->make.c_str(), cam->model.c_str()); delete(cam); @@ -132,7 +140,7 @@ void CameraMetaData::disableMake( string make ) { - map<string, Camera*>::iterator i = cameras.begin(); + std::map<CameraId, Camera*>::iterator i = cameras.begin(); for (; i != cameras.end(); ++i) { Camera* cam = (*i).second; if (0 == cam->make.compare(make)) { @@ -143,7 +151,7 @@ void CameraMetaData::disableCamera( string make, string model ) { - map<string, Camera*>::iterator i = cameras.begin(); + std::map<CameraId, Camera*>::iterator i = cameras.begin(); for (; i != cameras.end(); ++i) { Camera* cam = (*i).second; if (0 == cam->make.compare(make) && 0 == cam->model.compare(model)) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/darktable-2.2.3/src/external/rawspeed/RawSpeed/CameraMetaData.h new/darktable-2.2.4/src/external/rawspeed/RawSpeed/CameraMetaData.h --- old/darktable-2.2.3/src/external/rawspeed/RawSpeed/CameraMetaData.h 2017-01-31 10:39:17.000000000 +0100 +++ new/darktable-2.2.4/src/external/rawspeed/RawSpeed/CameraMetaData.h 2017-04-01 20:27:39.000000000 +0200 @@ -28,13 +28,24 @@ using namespace pugi; +struct CameraId { + std::string make; + std::string model; + std::string mode; + + bool operator<(const CameraId& rhs) const { + return std::tie(make, model, mode) < + std::tie(rhs.make, rhs.model, rhs.mode); + } +}; + class CameraMetaData { public: CameraMetaData(); CameraMetaData(const char *docname); virtual ~CameraMetaData(void); - map<string,Camera*> cameras; + std::map<CameraId, Camera*> cameras; map<uint32,Camera*> chdkCameras; // searches for camera with given make + model + mode diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/darktable-2.2.3/src/external/rawspeed/data/cameras.xml new/darktable-2.2.4/src/external/rawspeed/data/cameras.xml --- old/darktable-2.2.3/src/external/rawspeed/data/cameras.xml 2017-01-31 10:39:17.000000000 +0100 +++ new/darktable-2.2.4/src/external/rawspeed/data/cameras.xml 2017-04-01 20:27:39.000000000 +0200 @@ -3405,6 +3405,34 @@ <Crop x="0" y="0" width="-44" height="0"/> <Sensor black="0" white="15892"/> </Camera> + <Camera make="NIKON" model="COOLPIX B700"> + <ID make="Nikon" model="COOLPIX B700">Nikon Coolpix B700</ID> + <CFA width="2" height="2"> + <Color x="0" y="0">RED</Color> + <Color x="1" y="0">GREEN</Color> + <Color x="0" y="1">GREEN</Color> + <Color x="1" y="1">BLUE</Color> + </CFA> + <Crop x="0" y="0" width="0" height="0"/> + <Sensor black="200" white="4000"/> + <Hints> + <Hint name="coolpixmangled" value=""/> + </Hints> + </Camera> + <Camera make="NIKON" model="COOLPIX B700" mode="12bit-uncompressed"> + <ID make="Nikon" model="COOLPIX B700">Nikon Coolpix B700</ID> + <CFA width="2" height="2"> + <Color x="0" y="0">RED</Color> + <Color x="1" y="0">GREEN</Color> + <Color x="0" y="1">GREEN</Color> + <Color x="1" y="1">BLUE</Color> + </CFA> + <Crop x="0" y="0" width="0" height="0"/> + <Sensor black="200" white="4000"/> + <Hints> + <Hint name="coolpixmangled" value=""/> + </Hints> + </Camera> <Camera make="NIKON" model="COOLPIX P6000" mode="12bit-uncompressed" decoder_version="1"> <ID make="Nikon" model="Coolpix P6000">Nikon Coolpix P6000</ID> <CFA width="2" height="2"> @@ -3809,6 +3837,17 @@ <Crop x="0" y="0" width="0" height="0"/> <Sensor black="255" white="4095"/> </Camera> + <Camera make="OLYMPUS CORPORATION" model="E-M1MarkII"> + <ID make="Olympus" model="E-M1MarkII">Olympus E-M1 Mark II</ID> + <CFA width="2" height="2"> + <Color x="0" y="0">RED</Color> + <Color x="1" y="0">GREEN</Color> + <Color x="0" y="1">GREEN</Color> + <Color x="1" y="1">BLUE</Color> + </CFA> + <Crop x="0" y="0" width="0" height="0"/> + <Sensor black="254" white="4000"/> + </Camera> <Camera make="OLYMPUS IMAGING CORP." model="E-M10"> <ID make="Olympus" model="E-M10">Olympus E-M10</ID> <CFA width="2" height="2"> @@ -6576,6 +6615,76 @@ <Crop x="0" y="0" width="-128" height="0"/> <Sensor black="145" white="3956"/> </Camera> + <Camera make="Panasonic" model="DMC-TZ61"> + <ID make="Panasonic" model="DMC-TZ61">Panasonic DMC-ZS40</ID> + <CFA width="2" height="2"> + <Color x="0" y="0">RED</Color> + <Color x="1" y="0">GREEN</Color> + <Color x="0" y="1">GREEN</Color> + <Color x="1" y="1">BLUE</Color> + </CFA> + <Crop x="0" y="0" width="0" height="0"/> + <Sensor black="145" white="3971"/> + <Aliases> + <Alias>DMC-ZS40</Alias> + </Aliases> + </Camera> + <Camera make="Panasonic" model="DMC-TZ61" mode="4:3"> + <ID make="Panasonic" model="DMC-TZ61">Panasonic DMC-ZS40</ID> + <CFA width="2" height="2"> + <Color x="0" y="0">RED</Color> + <Color x="1" y="0">GREEN</Color> + <Color x="0" y="1">GREEN</Color> + <Color x="1" y="1">BLUE</Color> + </CFA> + <Crop x="0" y="0" width="-126" height="0"/> + <Sensor black="146" white="3971"/> + <Aliases> + <Alias>DMC-ZS40</Alias> + </Aliases> + </Camera> + <Camera make="Panasonic" model="DMC-TZ61" mode="3:2"> + <ID make="Panasonic" model="DMC-TZ61">Panasonic DMC-ZS40</ID> + <CFA width="2" height="2"> + <Color x="0" y="0">RED</Color> + <Color x="1" y="0">GREEN</Color> + <Color x="0" y="1">GREEN</Color> + <Color x="1" y="1">BLUE</Color> + </CFA> + <Crop x="0" y="0" width="-126" height="0"/> + <Sensor black="146" white="3971"/> + <Aliases> + <Alias>DMC-ZS40</Alias> + </Aliases> + </Camera> + <Camera make="Panasonic" model="DMC-TZ61" mode="1:1"> + <ID make="Panasonic" model="DMC-TZ61">Panasonic DMC-ZS40</ID> + <CFA width="2" height="2"> + <Color x="0" y="0">RED</Color> + <Color x="1" y="0">GREEN</Color> + <Color x="0" y="1">GREEN</Color> + <Color x="1" y="1">BLUE</Color> + </CFA> + <Crop x="0" y="0" width="-6" height="0"/> + <Sensor black="146" white="3971"/> + <Aliases> + <Alias>DMC-ZS40</Alias> + </Aliases> + </Camera> + <Camera make="Panasonic" model="DMC-TZ61" mode="16:9"> + <ID make="Panasonic" model="DMC-TZ61">Panasonic DMC-ZS40</ID> + <CFA width="2" height="2"> + <Color x="0" y="0">RED</Color> + <Color x="1" y="0">GREEN</Color> + <Color x="0" y="1">GREEN</Color> + <Color x="1" y="1">BLUE</Color> + </CFA> + <Crop x="0" y="0" width="-126" height="0"/> + <Sensor black="146" white="3971"/> + <Aliases> + <Alias>DMC-ZS40</Alias> + </Aliases> + </Camera> <Camera make="Panasonic" model="DMC-TZ71"> <ID make="Panasonic" model="DMC-TZ71">Panasonic DMC-ZS50</ID> <CFA width="2" height="2"> @@ -8397,6 +8506,19 @@ <Crop x="0" y="0" width="-64" height="0"/> <Sensor black="257" white="4094"/> </Camera> + <Camera make="FUJIFILM" model="X100F"> + <ID make="Fujifilm" model="X100F">Fujifilm X100F</ID> + <CFA2 width="6" height="6"> + <ColorRow y="0">RBGBRG</ColorRow> + <ColorRow y="1">GGRGGB</ColorRow> + <ColorRow y="2">GGBGGR</ColorRow> + <ColorRow y="3">BRGRBG</ColorRow> + <ColorRow y="4">GGBGGR</ColorRow> + <ColorRow y="5">GGRGGB</ColorRow> + </CFA2> + <Crop x="0" y="0" width="-126" height="0"/> + <Sensor black="1024" white="16383"/> + </Camera> <Camera make="FUJIFILM" model="X100S"> <ID make="Fujifilm" model="X100S">Fujifilm X100S</ID> <CFA2 width="6" height="6"> @@ -8549,6 +8671,19 @@ <Crop x="4" y="0" width="-52" height="0"/> <Sensor black="1024" white="16383"/> </Camera> + <Camera make="FUJIFILM" model="X-T20"> + <ID make="Fujifilm" model="X-T20">Fujifilm X-T20</ID> + <CFA2 width="6" height="6"> + <ColorRow y="0">RBGBRG</ColorRow> + <ColorRow y="1">GGRGGB</ColorRow> + <ColorRow y="2">GGBGGR</ColorRow> + <ColorRow y="3">BRGRBG</ColorRow> + <ColorRow y="4">GGBGGR</ColorRow> + <ColorRow y="5">GGRGGB</ColorRow> + </CFA2> + <Crop x="0" y="0" width="-126" height="0"/> + <Sensor black="1024" white="16383"/> + </Camera> <Camera make="KONICA MINOLTA" model="DYNAX 5D"> <ID make="Minolta" model="Dynax 5D">Konica Minolta Maxxum 5D</ID> <CFA width="2" height="2"> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/darktable-2.2.3/src/imageio/storage/picasa.c new/darktable-2.2.4/src/imageio/storage/picasa.c --- old/darktable-2.2.3/src/imageio/storage/picasa.c 2017-01-31 10:39:17.000000000 +0100 +++ new/darktable-2.2.4/src/imageio/storage/picasa.c 2017-04-01 20:27:39.000000000 +0200 @@ -133,8 +133,6 @@ gchar album_id[1024]; gchar userid[1024]; - gchar *album_title; - gchar *album_summary; int album_permission; /// curl context @@ -160,15 +158,6 @@ GtkDarktableButton *dtbutton_refresh_album; GtkComboBox *comboBox_album; - // === album creation section === - GtkLabel *label_album_title; - GtkLabel *label_album_summary; - - GtkEntry *entry_album_title; - GtkEntry *entry_album_summary; - - GtkBox *hbox_album; - // == context == gboolean connected; PicasaContext *picasa_api; @@ -190,8 +179,6 @@ curl_easy_cleanup(ctx->curl_ctx); g_free(ctx->token); g_free(ctx->refresh_token); - g_free(ctx->album_title); - g_free(ctx->album_summary); g_object_unref(ctx->json_parser); g_string_free(ctx->errmsg, TRUE); g_free(ctx); @@ -455,101 +442,6 @@ } /** - * @see https://developers.google.com/picasa-web/docs/2.0/developers_guide_protocol#AddAlbums - * @return the id of the newly reacted - */ -static const gchar *picasa_create_album(PicasaContext *ctx, gchar *name, gchar *summary, - PicasaAlbumPrivacyPolicy privacy) -{ - _buffer_t buffer = { 0 }; - - gchar *photo_id = NULL; - gchar *private = NULL; - char uri[4096] = { 0 }; - struct curl_slist *headers = NULL; - - if(privacy == PICASA_ALBUM_PRIVACY_PUBLIC) - private = g_strdup("public"); - else - private = g_strdup("private"); - - gchar *entry = g_markup_printf_escaped("<entry xmlns='http://www.w3.org/2005/Atom'\n" - "xmlns:media='http://search.yahoo.com/mrss/'\n" - "xmlns:gphoto='http://schemas.google.com/photos/2007'>\n" - "<title type='text'>%s</title>\n" - "<summary type='text'>%s</summary>\n" - "<gphoto:access>%s</gphoto:access>\n" - "<media:group>\n" - " <media:keywords></media:keywords>\n" - "</media:group>\n" - "<category scheme='http://schemas.google.com/g/2005#kind'\n" - " term='http://schemas.google.com/photos/2007#album'></category>\n" - "</entry>\n", - name, summary, private); - - g_free(private); - - gchar *authHeader = NULL; - authHeader = dt_util_dstrcat(authHeader, "Authorization: OAuth %s", ctx->token); - - headers = curl_slist_append(headers, "GData-Version: 2"); - headers = curl_slist_append(headers, "Content-Type: application/atom+xml"); - headers = curl_slist_append(headers, authHeader); - - g_strlcpy(uri, "https://picasaweb.google.com/data/feed/api/user/default", sizeof(uri)); - curl_easy_setopt(ctx->curl_ctx, CURLOPT_URL, uri); -#ifdef picasa_EXTRA_VERBOSE - curl_easy_setopt(ctx->curl_ctx, CURLOPT_VERBOSE, 2); -#endif - curl_easy_setopt(ctx->curl_ctx, CURLOPT_HTTPHEADER, headers); - curl_easy_setopt(ctx->curl_ctx, CURLOPT_POST, 1); - curl_easy_setopt(ctx->curl_ctx, CURLOPT_FOLLOWLOCATION, 1); - curl_easy_setopt(ctx->curl_ctx, CURLOPT_POSTFIELDS, entry); - curl_easy_setopt(ctx->curl_ctx, CURLOPT_WRITEFUNCTION, _picasa_api_buffer_write_func); - curl_easy_setopt(ctx->curl_ctx, CURLOPT_WRITEDATA, &buffer); - - curl_easy_perform(ctx->curl_ctx); - - curl_slist_free_all(headers); - - long result; - curl_easy_getinfo(ctx->curl_ctx, CURLINFO_RESPONSE_CODE, &result); -#ifdef picasa_EXTRA_VERBOSE - printf("Create album buffer response: %s\n", buffer.data); -#endif - - if(result == 201) - { - xmlDocPtr doc; - xmlNodePtr entryNode; - // Parse xml document - if((doc = xmlParseDoc((xmlChar *)buffer.data)) == NULL) return 0; - entryNode = xmlDocGetRootElement(doc); - if(!xmlStrcmp(entryNode->name, (const xmlChar *)"entry")) - { - xmlNodePtr entryChilds = entryNode->xmlChildrenNode; - if(entryChilds != NULL) - { - do - { - if((!xmlStrcmp(entryChilds->name, (const xmlChar *)"id"))) - { - // Get the album id - xmlChar *id = xmlNodeListGetString(doc, entryChilds->xmlChildrenNode, 1); - if(xmlStrncmp(id, (const xmlChar *)"http://", 7)) photo_id = g_strdup((const char *)id); - xmlFree(id); - } - } while((entryChilds = entryChilds->next) != NULL); - } - } - - return photo_id; - } - - return NULL; -} - -/** * @see https://developers.google.com/picasa-web/docs/2.0/developers_guide_protocol#PostPhotos * @return the id of the uploaded photo */ @@ -596,8 +488,7 @@ struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Content-Type: multipart/related; boundary=\"END_OF_PART\""); headers = curl_slist_append(headers, "MIME-version: 1.0"); - headers = curl_slist_append(headers, "Expect:"); - headers = curl_slist_append(headers, "GData-Version: 2"); + headers = curl_slist_append(headers, "GData-Version: 3"); headers = curl_slist_append(headers, authHeader); snprintf(uri, sizeof(uri), "https://picasaweb.google.com/data/feed/api/user/default/albumid/%s", albumid); @@ -693,8 +584,7 @@ headers = NULL; headers = curl_slist_append(headers, "Content-Type: application/atom+xml"); headers = curl_slist_append(headers, "If-Match: *"); - headers = curl_slist_append(headers, "Expect:"); - headers = curl_slist_append(headers, "GData-Version: 2"); + headers = curl_slist_append(headers, "GData-Version: 3"); headers = curl_slist_append(headers, authHeader); _buffer_t response = { 0 }; @@ -1045,7 +935,7 @@ GtkTreeIter iter; gtk_list_store_clear(model_album); gtk_list_store_append(model_album, &iter); - gtk_list_store_set(model_album, &iter, COMBO_ALBUM_MODEL_NAME_COL, _("create new album"), + gtk_list_store_set(model_album, &iter, COMBO_ALBUM_MODEL_NAME_COL, _("drop box"), COMBO_ALBUM_MODEL_ID_COL, NULL, -1); if(albumList != NULL) { @@ -1067,13 +957,6 @@ return; } -static void ui_reset_albums_creation(struct dt_storage_picasa_gui_data_t *ui) -{ - gtk_entry_set_text(ui->entry_album_summary, ""); - gtk_entry_set_text(ui->entry_album_title, ""); - gtk_widget_hide(GTK_WIDGET(ui->hbox_album)); -} - static void ui_combo_username_changed(GtkComboBox *combo, struct dt_storage_picasa_gui_data_t *ui) { GtkTreeIter iter; @@ -1107,13 +990,10 @@ GtkListStore *model_album = GTK_LIST_STORE(gtk_combo_box_get_model(ui->comboBox_album)); gtk_list_store_clear(model_album); } - ui_reset_albums_creation(ui); } static void ui_combo_album_changed(GtkComboBox *combo, gpointer data) { - dt_storage_picasa_gui_data_t *ui = (dt_storage_picasa_gui_data_t *)data; - GtkTreeIter iter; gchar *albumid = NULL; if(gtk_combo_box_get_active_iter(combo, &iter)) @@ -1121,17 +1001,6 @@ GtkTreeModel *model = gtk_combo_box_get_model(combo); gtk_tree_model_get(model, &iter, COMBO_ALBUM_MODEL_ID_COL, &albumid, -1); // get the album id } - - if(albumid == NULL) - { - gtk_widget_set_no_show_all(GTK_WIDGET(ui->hbox_album), FALSE); - gtk_widget_show_all(GTK_WIDGET(ui->hbox_album)); - } - else - { - gtk_widget_set_no_show_all(GTK_WIDGET(ui->hbox_album), TRUE); - gtk_widget_hide(GTK_WIDGET(ui->hbox_album)); - } } @@ -1295,14 +1164,6 @@ self->widget = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); - // create labels - ui->label_album_title = GTK_LABEL(gtk_label_new(_("title"))); - ui->label_album_summary = GTK_LABEL(gtk_label_new(_("summary"))); - ui->label_status = GTK_LABEL(gtk_label_new(NULL)); - - gtk_widget_set_halign(GTK_WIDGET(ui->label_album_title), GTK_ALIGN_START); - gtk_widget_set_halign(GTK_WIDGET(ui->label_album_summary), GTK_ALIGN_START); - // create entries GtkListStore *model_username = gtk_list_store_new(COMBO_USER_MODEL_NB_COL, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, @@ -1314,12 +1175,7 @@ gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(ui->comboBox_username), p_cell, FALSE); gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(ui->comboBox_username), p_cell, "text", 0, NULL); - ui->entry_album_title = GTK_ENTRY(gtk_entry_new()); - ui->entry_album_summary = GTK_ENTRY(gtk_entry_new()); - dt_gui_key_accel_block_on_focus_connect(GTK_WIDGET(ui->comboBox_username)); - dt_gui_key_accel_block_on_focus_connect(GTK_WIDGET(ui->entry_album_title)); - dt_gui_key_accel_block_on_focus_connect(GTK_WIDGET(ui->entry_album_summary)); // retrieve saved accounts ui_refresh_users(ui); @@ -1357,19 +1213,6 @@ gtk_box_pack_start(GTK_BOX(vbox_auth_fields), GTK_WIDGET(albumlist), TRUE, FALSE, 2); - ////the album creation box - ui->hbox_album = GTK_BOX(gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5)); - gtk_widget_set_no_show_all(GTK_WIDGET(ui->hbox_album), TRUE); // hide it by default - GtkWidget *vbox_album_labels = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); - GtkWidget *vbox_album_fields = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); - gtk_box_pack_start(GTK_BOX(self->widget), GTK_WIDGET(ui->hbox_album), TRUE, FALSE, 5); - gtk_box_pack_start(GTK_BOX(ui->hbox_album), vbox_album_labels, FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(ui->hbox_album), vbox_album_fields, TRUE, TRUE, 0); - gtk_box_pack_start(GTK_BOX(vbox_album_labels), GTK_WIDGET(ui->label_album_title), TRUE, TRUE, 0); - gtk_box_pack_start(GTK_BOX(vbox_album_fields), GTK_WIDGET(ui->entry_album_title), TRUE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(vbox_album_labels), GTK_WIDGET(ui->label_album_summary), TRUE, TRUE, 0); - gtk_box_pack_start(GTK_BOX(vbox_album_fields), GTK_WIDGET(ui->entry_album_summary), TRUE, FALSE, 0); - // connect buttons to signals g_signal_connect(G_OBJECT(ui->button_login), "clicked", G_CALLBACK(ui_login_clicked), (gpointer)ui); g_signal_connect(G_OBJECT(ui->comboBox_username), "changed", G_CALLBACK(ui_combo_username_changed), @@ -1385,8 +1228,6 @@ { dt_storage_picasa_gui_data_t *ui = self->gui_data; dt_gui_key_accel_block_on_focus_disconnect(GTK_WIDGET(ui->comboBox_username)); - dt_gui_key_accel_block_on_focus_disconnect(GTK_WIDGET(ui->entry_album_title)); - dt_gui_key_accel_block_on_focus_disconnect(GTK_WIDGET(ui->entry_album_summary)); if(ui->picasa_api != NULL) picasa_api_destroy(ui->picasa_api); g_free(self->gui_data); } @@ -1448,25 +1289,6 @@ goto cleanup; } - if(!*(ctx->album_id)) - { - if(ctx->album_title == NULL) - { - dt_control_log(_("unable to create album, no title provided")); - result = 0; - goto cleanup; - } - const gchar *album_id - = picasa_create_album(ctx, ctx->album_title, ctx->album_summary, ctx->album_permission); - if(album_id == NULL) - { - dt_control_log(_("unable to create album")); - result = 0; - goto cleanup; - } - g_snprintf(ctx->album_id, sizeof(ctx->album_id), "%s", album_id); - } - const char *photoid = picasa_upload_photo_to_album(ctx, ctx->album_id, fname, title, summary, imgid); if(photoid == NULL) { @@ -1491,7 +1313,6 @@ static gboolean _finalize_store(gpointer user_data) { dt_storage_picasa_gui_data_t *ui = (dt_storage_picasa_gui_data_t *)user_data; - ui_reset_albums_creation(ui); ui_refresh_albums(ui); return FALSE; @@ -1535,9 +1356,7 @@ } else if(index == 0) { - p->album_id[0] = 0; - p->album_title = g_strdup(gtk_entry_get_text(ui->entry_album_title)); - p->album_summary = g_strdup(gtk_entry_get_text(ui->entry_album_summary)); + g_snprintf(p->album_id, sizeof(p->album_id), "default"); /* Hardcode the album as private, to avoid problems with the old Picasa interface */ p->album_permission = 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/darktable-2.2.3/src/iop/colormapping.c new/darktable-2.2.4/src/iop/colormapping.c --- old/darktable-2.2.3/src/iop/colormapping.c 2017-01-31 10:39:17.000000000 +0100 +++ new/darktable-2.2.4/src/iop/colormapping.c 2017-04-01 20:27:39.000000000 +0200 @@ -686,6 +686,13 @@ dt_bilateral_free_cl(b); b = NULL; // make sure we don't clean it up twice } + else + { + size_t origin[] = { 0, 0, 0 }; + size_t region[] = { width, height, 1 }; + err = dt_opencl_enqueue_copy_image(devid, dev_out, dev_tmp, origin, origin, region); + if(err != CL_SUCCESS) goto error; + } dt_opencl_set_kernel_arg(devid, gd->kernel_mapping, 0, sizeof(cl_mem), (void *)&dev_in); dt_opencl_set_kernel_arg(devid, gd->kernel_mapping, 1, sizeof(cl_mem), (void *)&dev_tmp); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/darktable-2.2.3/src/iop/demosaic.c new/darktable-2.2.4/src/iop/demosaic.c --- old/darktable-2.2.3/src/iop/demosaic.c 2017-01-31 10:39:17.000000000 +0100 +++ new/darktable-2.2.4/src/iop/demosaic.c 2017-04-01 20:27:39.000000000 +0200 @@ -2375,6 +2375,25 @@ do { + // manage borders for linear interpolation part + const int border = 1; + + size_t sizes[3] = { ROUNDUPWD(width), ROUNDUPHT(height), 1 }; + dt_opencl_set_kernel_arg(devid, gd->kernel_vng_border_interpolate, 0, sizeof(cl_mem), (void *)&dev_in); + dt_opencl_set_kernel_arg(devid, gd->kernel_vng_border_interpolate, 1, sizeof(cl_mem), (void *)&dev_tmp); + dt_opencl_set_kernel_arg(devid, gd->kernel_vng_border_interpolate, 2, sizeof(int), (void *)&width); + dt_opencl_set_kernel_arg(devid, gd->kernel_vng_border_interpolate, 3, sizeof(int), (void *)&height); + dt_opencl_set_kernel_arg(devid, gd->kernel_vng_border_interpolate, 4, sizeof(int), (void *)&border); + dt_opencl_set_kernel_arg(devid, gd->kernel_vng_border_interpolate, 5, sizeof(int), (void *)&roi_in->x); + dt_opencl_set_kernel_arg(devid, gd->kernel_vng_border_interpolate, 6, sizeof(int), (void *)&roi_in->y); + dt_opencl_set_kernel_arg(devid, gd->kernel_vng_border_interpolate, 7, sizeof(uint32_t), (void *)&filters4); + dt_opencl_set_kernel_arg(devid, gd->kernel_vng_border_interpolate, 8, sizeof(cl_mem), (void *)&dev_xtrans); + err = dt_opencl_enqueue_kernel_2d(devid, gd->kernel_vng_border_interpolate, sizes); + if(err != CL_SUCCESS) goto error; + } while(0); + + do + { // do linear interpolation dt_iop_demosaic_cl_buffer_t locopt = (dt_iop_demosaic_cl_buffer_t){ .xoffset = 2*1, .xfactor = 1, .yoffset = 2*1, .yfactor = 1, @@ -2439,15 +2458,18 @@ do { // manage borders + const int border = 2; + size_t sizes[3] = { ROUNDUPWD(width), ROUNDUPHT(height), 1 }; dt_opencl_set_kernel_arg(devid, gd->kernel_vng_border_interpolate, 0, sizeof(cl_mem), (void *)&dev_in); dt_opencl_set_kernel_arg(devid, gd->kernel_vng_border_interpolate, 1, sizeof(cl_mem), (void *)&dev_aux); dt_opencl_set_kernel_arg(devid, gd->kernel_vng_border_interpolate, 2, sizeof(int), (void *)&width); dt_opencl_set_kernel_arg(devid, gd->kernel_vng_border_interpolate, 3, sizeof(int), (void *)&height); - dt_opencl_set_kernel_arg(devid, gd->kernel_vng_border_interpolate, 4, sizeof(int), (void *)&roi_in->x); - dt_opencl_set_kernel_arg(devid, gd->kernel_vng_border_interpolate, 5, sizeof(int), (void *)&roi_in->y); - dt_opencl_set_kernel_arg(devid, gd->kernel_vng_border_interpolate, 6, sizeof(uint32_t), (void *)&filters4); - dt_opencl_set_kernel_arg(devid, gd->kernel_vng_border_interpolate, 7, sizeof(cl_mem), (void *)&dev_xtrans); + dt_opencl_set_kernel_arg(devid, gd->kernel_vng_border_interpolate, 4, sizeof(int), (void *)&border); + dt_opencl_set_kernel_arg(devid, gd->kernel_vng_border_interpolate, 5, sizeof(int), (void *)&roi_in->x); + dt_opencl_set_kernel_arg(devid, gd->kernel_vng_border_interpolate, 6, sizeof(int), (void *)&roi_in->y); + dt_opencl_set_kernel_arg(devid, gd->kernel_vng_border_interpolate, 7, sizeof(uint32_t), (void *)&filters4); + dt_opencl_set_kernel_arg(devid, gd->kernel_vng_border_interpolate, 8, sizeof(cl_mem), (void *)&dev_xtrans); err = dt_opencl_enqueue_kernel_2d(devid, gd->kernel_vng_border_interpolate, sizes); if(err != CL_SUCCESS) goto error; } while(0); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/darktable-2.2.3/src/iop/denoiseprofile.c new/darktable-2.2.4/src/iop/denoiseprofile.c --- old/darktable-2.2.3/src/iop/denoiseprofile.c 2017-01-31 10:39:17.000000000 +0100 +++ new/darktable-2.2.4/src/iop/denoiseprofile.c 2017-04-01 20:27:39.000000000 +0200 @@ -1273,7 +1273,7 @@ const float aa[4] = { d->a[1] * wb[0], d->a[1] * wb[1], d->a[1] * wb[2], 1.0f }; const float bb[4] = { d->b[1] * wb[0], d->b[1] * wb[1], d->b[1] * wb[2], 1.0f }; const float sigma2[4] = { (bb[0] / aa[0]) * (bb[0] / aa[0]), (bb[1] / aa[1]) * (bb[1] / aa[1]), - (bb[2] / aa[1]) * (bb[2] / aa[1]), 0.0f }; + (bb[2] / aa[2]) * (bb[2] / aa[2]), 0.0f }; dev_tmp = dt_opencl_alloc_device(devid, width, height, 4 * sizeof(float)); if(dev_tmp == NULL) goto error; @@ -1560,7 +1560,7 @@ const float aa[4] = { d->a[1] * wb[0], d->a[1] * wb[1], d->a[1] * wb[2], 1.0f }; const float bb[4] = { d->b[1] * wb[0], d->b[1] * wb[1], d->b[1] * wb[2], 1.0f }; const float sigma2[4] = { (bb[0] / aa[0]) * (bb[0] / aa[0]), (bb[1] / aa[1]) * (bb[1] / aa[1]), - (bb[2] / aa[1]) * (bb[2] / aa[1]), 0.0f }; + (bb[2] / aa[2]) * (bb[2] / aa[2]), 0.0f }; size_t sizes[] = { ROUNDUPWD(width), ROUNDUPHT(height), 1 }; @@ -1616,7 +1616,7 @@ const float sigma = 1.0f; // it is then transformed by wavelet scales via the 5 tap a-trous filter: const float varf = sqrtf(2.0f + 2.0f * 4.0f * 4.0f + 6.0f * 6.0f) / 16.0f; // about 0.5 - const float sigma_band = powf(varf, scale) * sigma; + const float sigma_band = powf(varf, s) * sigma; // determine thrs as bayesshrink float sum_y2[3] = { 0.0f }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/darktable-2.2.3/src/libs/import.c new/darktable-2.2.4/src/libs/import.c --- old/darktable-2.2.3/src/libs/import.c 2017-01-31 10:39:17.000000000 +0100 +++ new/darktable-2.2.4/src/libs/import.c 2017-04-01 20:27:39.000000000 +0200 @@ -404,6 +404,11 @@ } #endif +static void _check_button_callback(GtkWidget *widget, gpointer data) +{ + dt_conf_set_bool("ui_last/import_ignore_jpegs", + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))); +} static GtkWidget *_lib_import_get_extra_widget(dt_lib_module_t *self,dt_lib_import_metadata_t *data, gboolean import_folder) { @@ -450,6 +455,8 @@ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ignore_jpeg), dt_conf_get_bool("ui_last/import_ignore_jpegs")); gtk_box_pack_start(GTK_BOX(extra), ignore_jpeg, FALSE, FALSE, 0); + g_signal_connect(G_OBJECT(ignore_jpeg), "clicked", + G_CALLBACK(_check_button_callback), ignore_jpeg); } // default metadata diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/darktable-2.2.3/src/version_gen.c new/darktable-2.2.4/src/version_gen.c --- old/darktable-2.2.3/src/version_gen.c 2017-01-31 16:26:52.000000000 +0100 +++ new/darktable-2.2.4/src/version_gen.c 2017-04-03 08:46:38.000000000 +0200 @@ -1,5 +1,5 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif -const char darktable_package_version[] = "2.2.3"; -const char darktable_package_string[] = PACKAGE_NAME " 2.2.3"; +const char darktable_package_version[] = "2.2.4"; +const char darktable_package_string[] = PACKAGE_NAME " 2.2.4"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/darktable-2.2.3/tools/purge_from_cache.sh new/darktable-2.2.4/tools/purge_from_cache.sh --- old/darktable-2.2.3/tools/purge_from_cache.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/darktable-2.2.4/tools/purge_from_cache.sh 2017-04-01 20:27:39.000000000 +0200 @@ -0,0 +1,109 @@ +#!/bin/sh + +# MIT License +# +# Copyright (c) 2017 Tobias Ellinghaus +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +. "$(dirname "$0")/common.sh" + +# default values +library="${HOME}/.config/darktable/library.db" +cache_base="${HOME}/.cache/darktable" +dryrun=1 + +# remember the command line to show it in the end when not purging +commandline="$0 $@" + +# handle command line arguments +while [ "$#" -ge 1 ] ; do + option="$1" + case ${option} in + -h|--help) + echo "Delete thumbnails of images that are no longer in darktable's library" + echo "Usage: $0 [options]" + echo "" + echo "Options:" + echo " -c|--cache_base <path> path to the place where darktable's thumbnail caches are stored" + echo " (default: '${cache_base}')" + echo " -l|--library <path> path to the library.db" + echo " (default: '${library}')" + echo " -p|--purge actually delete the files instead of just finding them" + exit 0 + ;; + -l|--library) + library="$2" + shift + ;; + -c|--cache_base) + cache_base="$2" + shift + ;; + -p|--purge) + dryrun=0 + ;; + *) + echo "warning: ignoring unknown option $option" + ;; + esac + shift +done + +# set the command to run for each stale file +action="echo found stale mipmap in " +if [ ${dryrun} -eq 0 ]; then + action="rm --force" +fi + +# get absolute canonical path to library. needed for cache dir +library=$(ReadLink "${library}") + +if [ ! -f "${library}" ]; then + echo "library '${library}' doesn't exist" + exit 1 +fi + +# the mipmap directory matching the selected library +cache_dir="${cache_base}/mipmaps-$(echo -n "${library}" | sha1sum | cut --delimiter=" " --fields=1).d" + +if [ ! -d "${cache_dir}" ]; then + echo "cache directory '${cache_dir}' doesn't exist" + exit 1 +fi + +# get a list of all image ids from the library +id_list=$(mktemp -t darktable-tmp.XXXXXX) +sqlite3 "${library}" "select id from images order by id" > "${id_list}" + +# iterate over cached mipmaps and check for each if the image is in the db +find "${cache_dir}" -type f | while read mipmap; do + # get the image id from the filename + id=$(echo "${mipmap}" | sed 's,.*/\([0-9]*\).*,\1,') + # ... and delete it if it's not in the library + grep "^${id}\$" "${id_list}" > /dev/null || ${action} "${mipmap}" +done + +rm --force "${id_list}" + +if [ $dryrun -eq 1 ]; then + echo + echo to really remove stale thumbnails from the cache call: + echo "${commandline} --purge" +fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/darktable-2.2.3/tools/watch_folder.sh new/darktable-2.2.4/tools/watch_folder.sh --- old/darktable-2.2.3/tools/watch_folder.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/darktable-2.2.4/tools/watch_folder.sh 2017-04-01 20:27:39.000000000 +0200 @@ -0,0 +1,92 @@ +#!/bin/sh + +# MIT License +# +# Copyright (c) 2016-2017 Tobias Ellinghaus +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +. "$(dirname "$0")/common.sh" + +if [ $# -ne 1 ]; then + echo "This script watches a folder for new images and imports them into a running instance of darktable" + echo "Usage: $0 <folder>" + exit 1 +fi + +BASE_FOLDER=$(ReadLink "$1") + +if [ ! -d "${BASE_FOLDER}" ]; then + echo "error accessing directory '$BASE_FOLDER'" + exit 1 +fi + +DBUS_SEND=$(which dbus-send) +if [ $? -ne 0 ]; then + echo "can't find 'dbus-send' in PATH" + exit 1 +fi + +INOTIFYWAIT=$(which inotifywait) +if [ $? -ne 0 ]; then + echo "can't find 'inotifywait' in PATH" + exit 1 +fi + +HAVE_LUA=$("${DBUS_SEND}" --print-reply --type=method_call --dest=org.darktable.service /darktable org.freedesktop.DBus.Properties.Get string:org.darktable.service.Remote string:LuaEnabled 2> /dev/null) +if [ $? -ne 0 ]; then + echo "darktable isn't running or DBUS isn't working properly" + exit 1 +fi + +echo "${HAVE_LUA}" | grep "true$" > /dev/null +HAVE_LUA=$? + +cleanup() +{ + "${DBUS_SEND}" --type=method_call --dest=org.darktable.service /darktable org.darktable.service.Remote.Lua string:"require('darktable').print('stopping to watch \`${BASE_FOLDER}\'')" +} + +if [ ${HAVE_LUA} -eq 0 ]; then + echo "Using Lua to load images, no error handling but uninterrupted workflow" + "${DBUS_SEND}" --type=method_call --dest=org.darktable.service /darktable org.darktable.service.Remote.Lua string:"require('darktable').print('watching \`${BASE_FOLDER}\'')" + trap cleanup INT + trap "echo; echo clean up done. bye" EXIT +else + echo "darktable doesn't seem to support Lua, loading images directly. This results in better error handling but might interrupt the workflow" +fi + + + +"${INOTIFYWAIT}" --monitor "${BASE_FOLDER}" --event close_write --excludei ".*\.xmp$" | + while read path event file; do + if [ ${HAVE_LUA} -eq 0 ]; then + echo "'${file}' added" + "${DBUS_SEND}" --type=method_call --dest=org.darktable.service /darktable org.darktable.service.Remote.Lua string:"local dt = require('darktable') dt.database.import('${path}/${file}') dt.print('a new image was added')" + else + ID=`"${DBUS_SEND}" --print-reply --type=method_call --dest=org.darktable.service /darktable org.darktable.service.Remote.Open string:"${path}/${file}" | tail --lines 1 | sed 's/.* //'` + if [ "${ID}" -eq 0 ]; then + # TODO: maybe try to wait a few seconds and retry? Not sure if that is needed. + echo "'${file}' couldn't be added" + else + echo "'${file}' added with id ${ID}" + fi + fi + + done
