...
 
Commits (47)
......@@ -52,8 +52,8 @@ RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/80forceyes
# Fix broken packages
RUN echo 'APT::Get::Fix-Missing "true";' > /etc/apt/apt.conf.d/80fixmissin
ENV GCC_VER=7
ENV LLVM_VER=4.0
ENV GCC_VER=8
ENV LLVM_VER=6.0
# pls keep sorted :)
RUN rm -rf /var/lib/apt/lists/* && apt-get update && \
......
......@@ -50,21 +50,21 @@ matrix:
sudo: required
services:
- docker
env: CC=gcc-7 CXX=g++-7 TARGET=build
env: CC=gcc-8 CXX=g++-8 TARGET=build
#- os: osx
# env: CC=cc CXX=c++ TARGET=build # can't use CXX=g++ fails for osx.mm
- os: linux
sudo: required
services:
- docker
env: CC=clang-4.0 CXX=clang++-4.0 TARGET=build ECO="-DUSE_OPENMP=OFF -DUSE_OPENCL=OFF"
env: CC=clang-6.0 CXX=clang++-6.0 TARGET=build ECO="-DUSE_OPENMP=OFF -DUSE_OPENCL=OFF"
#- os: osx
# env: CC=gcc-7 CXX=c++ TARGET=build # can't use CXX=g++ fails for osx.mm
# env: CC=gcc-8 CXX=c++ TARGET=build # can't use CXX=g++ fails for osx.mm
- os: linux
sudo: required
services:
- docker
env: CC=gcc-7 CXX=g++-7 TARGET=usermanual # EXTRA_TMPFS="--tmpfs /tmp"
env: CC=gcc-8 CXX=g++-8 TARGET=usermanual # EXTRA_TMPFS="--tmpfs /tmp"
script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run --read-only --volume $TRAVIS_BUILD_DIR:$SRC_DIR:ro --tmpfs $BUILD_DIR --workdir $BUILD_DIR --tmpfs $INSTALL_PREFIX $EXTRA_TMPFS --env CC --env CXX --env CFLAGS --env CXXFLAGS --env SRC_DIR --env BUILD_DIR --env INSTALL_PREFIX --env TARGET --env ECO darktable/darktable sh -c "$SRC_DIR/.ci/ci-script.sh"; fi
......
......@@ -220,7 +220,7 @@ else(DEFINED PROJECT_VERSION)
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-a09bf23d6c61aec66643cd05f7d7784c33047988")
set(PROJECT_VERSION "archive-ea14702cd2d866d29b6270d94d04127681cf2323")
# but was it expanded?
if(PROJECT_VERSION MATCHES Format)
set(PROJECT_VERSION "unknown-version")
......
we’re proud to announce the third bugfix release for the 2.4 series of darktable, 2.4.3!
we’re proud to announce the fourth bugfix release for the 2.4 series of darktable, 2.4.4!
the github release is here: [https://github.com/darktable-org/darktable/releases/tag/release-2.4.3](https://github.com/darktable-org/darktable/releases/tag/release-2.4.3).
the github release is here: [https://github.com/darktable-org/darktable/releases/tag/release-2.4.4](https://github.com/darktable-org/darktable/releases/tag/release-2.4.4).
as always, please don't use the autogenerated tarball provided by github, but only our tar.xz. the checksums are:
```
$ sha256sum darktable-2.4.3.tar.xz
??? darktable-2.4.3.tar.xz
$ sha256sum darktable-2.4.3.dmg
??? darktable-2.4.3.dmg
$ sha256sum darktable-2.4.3-win64.exe
??? darktable-2.4.3-win64.exe
$ sha256sum darktable-2.4.3-win64.zip
??? darktable-2.4.3-win64.zip
$ sha256sum darktable-2.4.4.tar.xz
??? darktable-2.4.4.tar.xz
$ sha256sum darktable-2.4.4.dmg
??? darktable-2.4.4.dmg
$ sha256sum darktable-2.4.4-win64.exe
??? darktable-2.4.4-win64.exe
$ sha256sum darktable-2.4.4-win64.zip
??? darktable-2.4.4-win64.zip
```
when updating from the currently stable 2.2.x series, please bear in mind that your edits will be preserved during this process, but it will not be possible to downgrade from 2.4 to 2.2.x any more.
#### Important note: to make sure that darktable can keep on supporting the raw file format for your camera, *please* read [this post](https://discuss.pixls.us/t/raw-samples-wanted/5420?u=lebedevri) on how/what raw samples you can contribute to ensure that we have the *full* raw sample set for your camera under CC0 license!
and the changelog as compared to 2.4.2 can be found below.
and the changelog as compared to 2.4.3 can be found below.
## New Features
- Support for tags and ratings in the watermark module
- Read Xmp.exif.DateTimeOriginal from XMP sidecars
- Build and install noise tools
- Add a script for converting .dtyle to an .xmp
- Added 50% zoom option in darkroom mode to the navigation dropdown
- perspective correction: usability improvement – allow setting the radius when (de)selecting lines
## Bugfixes
- Don't create unneeded folders during export in some cases
- When collecting by tags, don't select subtags
- Fix language selection on OSX
- Fix a crash while tethering
- Fix selecting drives in the import dialog on Windows by bundling a patched glib
- Add some space between checkbox and label in color picker
- OpenCL: better readability of debug output on memory usage
- Levels: catch an edge case where float != int
- Fix the alignment in a tooltip in lens correction
- Local contrast: Reset strength slider to 120% when double clicked
- Drop unused clone masks when loading xmp files
- Remove all sub masks when clearing cloning masks
- darktable-cltest: do not print summary statistics on OpenCL usage
- Perspective correction: take aspect parameter into account when judging on neutral settings
- Haze removal: fix tiled processing
- Fix install on Windows due to GraphicsMagick's versioned filenames
- PPM: Handle byte order when loading files
- Fix #12165: Don't try to show dialog without gui
- Fix an out-of-bounds memory access
- Tools: Fix typo in darktable-gen-noiseprofile that made it unusable
- MacOS package: point gettext to correct localedir
## Camera support, compared to 2.4.2
#### Warning: support for Nikon NEF 'lossy after split' raws was unintentionally broken due to the lack of such samples. Please see [this post](https://discuss.pixls.us/t/nikon-a-specific-raw-sample-wanted/5483?u=lebedevri) for more details. If you have affected raws, please contribute samples!
### Base Support
- Fujifilm X-H1 (compressed)
- Kodak EOS DCS 3
- Olympus E-PL9
- Panasonic DC-GX9 (4:3)
- Sony DSC-RX1RM2
- Sony ILCE-7M3
### White Balance Presets
- Sony ILCE-7M3
- Sony ILCE-6500
### Noise Profiles
- Canon PowerShot G1 X Mark III
- Nikon D7500
- Sony ILCE-7M3
- Canon EOS 800D
- Canon EOS Kiss X9i
- Canon EOS Rebel T7i
- Nikon COOLPIX B700
- Nikon D5600
- Olympus TG-5
## Updated translations
- German
- Russian
......@@ -160,8 +160,8 @@ if (WIN32 AND NOT BUILD_MSYS2_INSTALL)
# Add GraphicsMagick libraries
install(DIRECTORY
"${MINGW_PATH}/../lib/GraphicsMagick-1.3.28/modules-Q8/coders"
DESTINATION lib/GraphicsMagick-1.3.28/modules-Q8/
"${MINGW_PATH}/../lib/GraphicsMagick-1.3.29/modules-Q8/coders"
DESTINATION lib/GraphicsMagick-1.3.29/modules-Q8/
COMPONENT DTApplication
FILES_MATCHING PATTERN "*"
PATTERN "*.a" EXCLUDE
......
......@@ -128,6 +128,12 @@ button:checked
background-color: shade(@selected_bg_color, 1.4);
}
#lib-plugin-ui checkbutton *,
#iop-plugin-ui checkbutton *
{
margin-right:4pt;
}
/* frame around plugin boxes */
#iop-plugin-ui
{
......
......@@ -1615,6 +1615,13 @@
<shortdescription/>
<longdescription/>
</dtconfig>
<dtconfig>
<name>plugins/darkroom/ashift/near_delta</name>
<type>float</type>
<default>20.0</default>
<shortdescription/>
<longdescription/>
</dtconfig>
<dtconfig>
<name>plugins/print/print/black_point_compensation</name>
<type>bool</type>
......
This diff is collapsed.
darktable (2.4.4-1~bpo9+1) stretch-backports; urgency=medium
* Rebuild for stretch-backports.
-- David Bremner <bremner@debian.org> Fri, 14 Sep 2018 21:21:04 -0300
darktable (2.4.4-1) unstable; urgency=medium
* New upstream bugfix release
-- David Bremner <bremner@debian.org> Sun, 10 Jun 2018 14:57:00 -0300
darktable (2.4.3-1~bpo9+1) stretch-backports; urgency=medium
* Non-maintainer upload.
......
......@@ -36,8 +36,8 @@ Build-Depends: cmake,
xsltproc
Standards-Version: 4.1.2
Homepage: http://www.darktable.org/
Vcs-Git: https://anonscm.debian.org/git/pkg-phototools/darktable.git
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-phototools/darktable.git
Vcs-Git: https://salsa.debian.org/debian-phototools-team/darktable.git
Vcs-Browser: https://salsa.debian.org/debian-phototools-team/darktable
Package: darktable
Architecture: any-amd64 any-arm64
......
This diff is collapsed.
This diff is collapsed.
......@@ -34,13 +34,13 @@
#include <stdlib.h>
#include <string.h>
#define DT_BAUHAUS_WIDGET_TYPE (dt_bh_get_type())
#define DT_BAUHAUS_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), DT_BAUHAUS_WIDGET_TYPE, DtBauhausWidget))
#define DT_BAUHAUS_WIDGET_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST((obj), DT_BAUHAUS_WIDGET, DtBauhausWidgetClass))
#define DT_IS_BAUHAUS_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), DT_BAUHAUS_WIDGET_TYPE))
#define DT_IS_BAUHAUS_WIDGET_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((obj), DT_BAUHAUS_WIDGET_TYPE))
#define DT_BAUHAUS_WIDGET_TYPE dt_bh_get_type()
#define DT_BAUHAUS_WIDGET(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), DT_BAUHAUS_WIDGET_TYPE, DtBauhausWidget)
#define DT_BAUHAUS_WIDGET_CLASS(obj) G_TYPE_CHECK_CLASS_CAST((obj), DT_BAUHAUS_WIDGET, DtBauhausWidgetClass)
#define DT_IS_BAUHAUS_WIDGET(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), DT_BAUHAUS_WIDGET_TYPE)
#define DT_IS_BAUHAUS_WIDGET_CLASS(obj) G_TYPE_CHECK_CLASS_TYPE((obj), DT_BAUHAUS_WIDGET_TYPE)
#define DT_BAUHAUS_WIDGET_GET_CLASS \
(G_TYPE_INSTANCE_GET_CLASS((obj), DT_BAUHAUS_WIDGET_TYPE, DtBauhausWidgetClass))
G_TYPE_INSTANCE_GET_CLASS((obj), DT_BAUHAUS_WIDGET_TYPE, DtBauhausWidgetClass)
extern GType DT_BAUHAUS_WIDGET_TYPE;
......
......@@ -447,7 +447,7 @@ int dt_init(int argc, char *argv[], const gboolean init_gui, const gboolean load
#ifdef HAVE_OPENCL
gboolean exclude_opencl = FALSE;
gboolean print_statistics = strcmp(argv[0], "darktable-cltest");
gboolean print_statistics = (strstr(argv[0], "darktable-cltest") == NULL);
#endif
#ifdef USE_LUA
......@@ -771,27 +771,27 @@ int dt_init(int argc, char *argv[], const gboolean init_gui, const gboolean load
gdk_set_allowed_backends("x11,*");
#endif
gtk_init(&argc, &argv);
}
// execute a performance check and configuration if needed
int last_configure_version = dt_conf_get_int("performance_configuration_version_completed");
if(last_configure_version < DT_CURRENT_PERFORMANCE_CONFIGURE_VERSION)
{
// ask the user whether he/she would like
// dt to make changes in the settings
gboolean run_configure = dt_gui_show_standalone_yes_no_dialog(
_("darktable - run performance configuration?"),
_("we have an updated performance configuration logic - executing that might improve the performance of "
"darktable.\nthis will potentially overwrite some of your existing settings - especially in case you "
"have manually modified them to custom values.\nwould you like to execute this update of the "
"performance configuration?\n"),
_("no"), _("yes"));
if(run_configure)
dt_configure_performance();
else
// make sure to set this, otherwise the user will be nagged until he eventually agrees
dt_conf_set_int("performance_configuration_version_completed", DT_CURRENT_PERFORMANCE_CONFIGURE_VERSION);
// execute a performance check and configuration if needed
int last_configure_version = dt_conf_get_int("performance_configuration_version_completed");
if(last_configure_version < DT_CURRENT_PERFORMANCE_CONFIGURE_VERSION)
{
// ask the user whether he/she would like
// dt to make changes in the settings
gboolean run_configure = dt_gui_show_standalone_yes_no_dialog(
_("darktable - run performance configuration?"),
_("we have an updated performance configuration logic - executing that might improve the performance of "
"darktable.\nthis will potentially overwrite some of your existing settings - especially in case you "
"have manually modified them to custom values.\nwould you like to execute this update of the "
"performance configuration?\n"),
_("no"), _("yes"));
if(run_configure)
dt_configure_performance();
else
// make sure to set this, otherwise the user will be nagged until he eventually agrees
dt_conf_set_int("performance_configuration_version_completed", DT_CURRENT_PERFORMANCE_CONFIGURE_VERSION);
}
}
// detect cpu features and decide which codepaths to enable
......
This diff is collapsed.
......@@ -169,6 +169,10 @@ void dt_loc_init_localedir(const char *localedir)
char *directory = dt_loc_find_install_dir(suffix, darktable.progname);
g_free(suffix);
darktable.localedir = dt_loc_init_generic(localedir, directory ? directory : DARKTABLE_LOCALEDIR);
#ifdef __APPLE__
if(directory && !localedir) //bind to bundle path
bindtextdomain(GETTEXT_PACKAGE, darktable.localedir);
#endif
g_free(directory);
#else
darktable.localedir = dt_loc_init_generic(localedir, DARKTABLE_LOCALEDIR);
......
......@@ -429,17 +429,23 @@ static const uint8_t _imageio_ldr_magic[] = {
gboolean dt_imageio_is_ldr(const char *filename)
{
size_t offset = 0;
uint8_t block[16] = { 0 };
uint8_t block[32] = { 0 }; // keep this big enough for whatever magic size we want to compare to!
FILE *fin = g_fopen(filename, "rb");
if(fin)
{
/* read block from file */
size_t s = fread(block, 16, 1, fin);
size_t s = fread(block, sizeof(block), 1, fin);
fclose(fin);
/* compare magic's */
while(s)
{
if(_imageio_ldr_magic[offset + 2] > sizeof(block)
|| offset + 3 + _imageio_ldr_magic[offset + 2] > sizeof(_imageio_ldr_magic))
{
fprintf(stderr, "error: buffer in %s is too small!\n", __FUNCTION__);
return FALSE;
}
if(memcmp(_imageio_ldr_magic + offset + 3, block + _imageio_ldr_magic[offset + 1],
_imageio_ldr_magic[offset + 2]) == 0)
{
......
......@@ -172,7 +172,11 @@ static dt_imageio_retval_t _read_ppm(dt_image_t *img, FILE*f, float *buf)
{
for(int c = 0; c < 3; c++)
{
float value = (float)line[x * 3 + c] / (float)max;
uint16_t intvalue = line[x * 3 + c];
// PPM files are big endian! http://netpbm.sourceforge.net/doc/ppm.html
if(G_BYTE_ORDER != G_BIG_ENDIAN)
intvalue = GUINT16_SWAP_LE_BE(intvalue);
float value = (float)intvalue / (float)max;
*buf_iter++ = value;
}
*buf_iter++ = 0.0;
......
......@@ -831,8 +831,8 @@ void dt_opencl_cleanup(dt_opencl_t *cl)
if(cl->print_statistics && (darktable.unmuted & DT_DEBUG_MEMORY))
{
dt_print(DT_DEBUG_OPENCL, "[opencl_summary_statistics] device '%s' (%d): peak memory usage %zu bytes\n",
cl->dev[i].name, i, cl->dev[i].peak_memory);
dt_print(DT_DEBUG_OPENCL, "[opencl_summary_statistics] device '%s' (%d): peak memory usage %zu bytes (%.1f MB)\n",
cl->dev[i].name, i, cl->dev[i].peak_memory, (float)cl->dev[i].peak_memory/(1024*1024));
}
if(cl->print_statistics && cl->use_events)
......@@ -2327,7 +2327,8 @@ void dt_opencl_memory_statistics(int devid, cl_mem mem, dt_opencl_memory_t actio
if(darktable.unmuted & DT_DEBUG_MEMORY)
dt_print(DT_DEBUG_OPENCL,
"[opencl memory] device %d: %zu bytes in use\n", devid, darktable.opencl->dev[devid].memory_in_use);
"[opencl memory] device %d: %zu bytes (%.1f MB) in use\n", devid, darktable.opencl->dev[devid].memory_in_use,
(float)darktable.opencl->dev[devid].memory_in_use/(1024*1024));
}
/** check if image size fit into limits given by OpenCL runtime */
......
......@@ -115,7 +115,7 @@ static _masks_undo_data_t *_create_snapshot(GList *forms, dt_masks_form_t *form,
return data;
}
void _masks_free_undo(gpointer data)
static void _masks_free_undo(gpointer data)
{
_masks_undo_data_t *udata = (_masks_undo_data_t *)data;
......@@ -125,7 +125,7 @@ void _masks_free_undo(gpointer data)
free(udata);
}
void _masks_do_undo(gpointer user_data, dt_undo_type_t type, dt_undo_data_t *item)
static void _masks_do_undo(gpointer user_data, dt_undo_type_t type, dt_undo_data_t *item)
{
dt_develop_t *dev = (dt_develop_t *)user_data;
_masks_undo_data_t *udata = (_masks_undo_data_t *)item;
......@@ -290,7 +290,7 @@ void dt_masks_gui_form_test_create(dt_masks_form_t *form, dt_masks_form_gui_t *g
}
}
void _check_id(dt_masks_form_t *form)
static void _check_id(dt_masks_form_t *form)
{
GList *forms = g_list_first(darktable.develop->forms);
int nid = 100;
......@@ -1274,6 +1274,7 @@ int dt_masks_events_mouse_moved(struct dt_iop_module_t *module, double x, double
return rep;
}
int dt_masks_events_button_released(struct dt_iop_module_t *module, double x, double y, int which,
uint32_t state)
{
......@@ -1472,7 +1473,6 @@ void dt_masks_reset_show_masks_icons(void)
}
}
void dt_masks_set_edit_mode(struct dt_iop_module_t *module, dt_masks_edit_mode_t value)
{
if(!module) return;
......@@ -1528,6 +1528,7 @@ static void _menu_no_masks(struct dt_iop_module_t *module)
dt_dev_add_history_item(darktable.develop, module, TRUE);
dt_dev_masks_list_change(darktable.develop);
}
static void _menu_add_circle(struct dt_iop_module_t *module)
{
// we want to be sure that the iop has focus
......@@ -1540,6 +1541,7 @@ static void _menu_add_circle(struct dt_iop_module_t *module)
darktable.develop->form_gui->creation_module = module;
dt_control_queue_redraw_center();
}
static void _menu_add_path(struct dt_iop_module_t *module)
{
// we want to be sure that the iop has focus
......@@ -1551,6 +1553,7 @@ static void _menu_add_path(struct dt_iop_module_t *module)
darktable.develop->form_gui->creation_module = module;
dt_control_queue_redraw_center();
}
static void _menu_add_gradient(struct dt_iop_module_t *module)
{
// we want to be sure that the iop has focus
......@@ -1563,6 +1566,7 @@ static void _menu_add_gradient(struct dt_iop_module_t *module)
darktable.develop->form_gui->creation_module = module;
dt_control_queue_redraw_center();
}
static void _menu_add_ellipse(struct dt_iop_module_t *module)
{
// we want to be sure that the iop has focus
......@@ -1575,6 +1579,7 @@ static void _menu_add_ellipse(struct dt_iop_module_t *module)
darktable.develop->form_gui->creation_module = module;
dt_control_queue_redraw_center();
}
static void _menu_add_brush(struct dt_iop_module_t *module)
{
// we want to be sure that the iop has focus
......@@ -1586,6 +1591,7 @@ static void _menu_add_brush(struct dt_iop_module_t *module)
darktable.develop->form_gui->creation_module = module;
dt_control_queue_redraw_center();
}
static void _menu_add_exist(dt_iop_module_t *module, int formid)
{
if(!module) return;
......@@ -1617,6 +1623,7 @@ static void _menu_add_exist(dt_iop_module_t *module, int formid)
dt_dev_masks_list_change(darktable.develop);
dt_masks_set_edit_mode(module, DT_MASKS_EDIT_FULL);
}
void dt_masks_iop_use_same_as(dt_iop_module_t *module, dt_iop_module_t *src)
{
if(!module || !src) return;
......@@ -1875,6 +1882,19 @@ void dt_masks_form_remove(struct dt_iop_module_t *module, dt_masks_form_t *grp,
return;
}
if(form->type & DT_MASKS_GROUP && form->type & DT_MASKS_CLONE)
{
// when removing a cloning group the children have to be removed, too, as they won't be shown in the mask manager
// and are thus not accessible afterwards.
while(form->points)
{
dt_masks_point_group_t *group_child = (dt_masks_point_group_t *)form->points->data;
dt_masks_form_t *child = dt_masks_get_from_id(darktable.develop, group_child->formid);
dt_masks_form_remove(module, form, child);
// no need to do anything to form->points, the recursive call will have removed child from the list
}
}
// if we are here that mean we have to permanently delete this form
// we drop the form from all modules
GList *iops = g_list_first(darktable.develop->iop);
......@@ -2341,6 +2361,7 @@ int dt_masks_point_in_form_near(float x, float y, float *points, int points_star
}
return 0;
}
// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.sh
// vim: shiftwidth=2 expandtab tabstop=2 cindent
// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
......@@ -7082,6 +7082,22 @@ const wb_data wb_preset[] =
{ "Sony", "ILCE-6300", Underwater, 0, { 2.8125, 1, 1.875, 0 } },
{ "Sony", "ILCE-6300", "5500k", 0, { 2.65234375, 1, 1.74609375, 0 } },
// Sony ILCE-6500 Firmware Version 1.05
{ "Sony", "ILCE-6500", Daylight, 0, { 2.6171875, 1, 1.74609375, 0 } },
{ "Sony", "ILCE-6500", Shade, 0, { 3.08203125, 1, 1.4375, 0 } },
{ "Sony", "ILCE-6500", Cloudy, 0, { 2.81640625, 1, 1.6015625, 0 } },
{ "Sony", "ILCE-6500", Tungsten, 0, { 1.65625, 1, 3.16796875, 0 } },
{ "Sony", "ILCE-6500", WarmWhiteFluorescent, 0, { 1.921875, 1, 3.12109375, 0 } },
{ "Sony", "ILCE-6500", CoolWhiteFluorescent, 0, { 2.4453125, 1, 2.57421875, 0 } },
{ "Sony", "ILCE-6500", DayWhiteFluorescent, 0, { 2.546875, 1, 1.84375, 0 } },
{ "Sony", "ILCE-6500", DaylightFluorescent, 0, { 2.83203125, 1, 1.67578125, 0 } },
{ "Sony", "ILCE-6500", Flash, 0, { 2.93359375, 1, 1.59765625, 0 } },
{ "Sony", "ILCE-6500", "2500K", 0, { 1.4453125, 1, 3.83203125, 0 } },
{ "Sony", "ILCE-6500", "3200K", 0, { 1.83984375, 1, 2.7421875, 0 } },
{ "Sony", "ILCE-6500", "4500K", 0, { 2.375, 1, 1.96875, 0 } },
{ "Sony", "ILCE-6500", "6000K", 0, { 2.79296875, 1, 1.6171875, 0 } },
{ "Sony", "ILCE-6500", "8500K", 0, { 3.23046875, 1, 1.36328125, 0 } },
{ "Sony", "ILCA-77M2", Daylight, 0,{ 2.78515625, 1, 1.6796875, 0 } },
{ "Sony", "ILCA-77M2", Shade, 0, { 3.28515625, 1, 1.38671875, 0 } },
{ "Sony", "ILCA-77M2", Cloudy, 0, { 2.99609375, 1, 1.54296875, 0 } },
......
......@@ -58,7 +58,6 @@
#define SHEAR_RANGE_SOFT 0.5 // allowed min/max range for shear parameter with manual adjustment
#define MIN_LINE_LENGTH 5 // the minimum length of a line in pixels to be regarded as relevant
#define MAX_TANGENTIAL_DEVIATION 30 // by how many degrees a line may deviate from the +/-180 and +/-90 to be regarded as relevant
#define POINTS_NEAR_DELTA 4 // distance of mouse pointer to line for "near" detection
#define LSD_SCALE 0.99 // LSD: scaling factor for line detection
#define LSD_SIGMA_SCALE 0.6 // LSD: sigma for Gaussian filter is computed as sigma = sigma_scale/scale
#define LSD_QUANT 2.0 // LSD: bound to the quantization error on the gradient norm
......@@ -374,6 +373,7 @@ typedef struct dt_iop_ashift_gui_data_t
int isselecting;
int isdeselecting;
dt_iop_ashift_bounding_t isbounding;
float near_delta;
int selecting_lines_version;
float rotation_range;
float lensshift_v_range;
......@@ -849,7 +849,8 @@ static inline int isneutral(dt_iop_ashift_data_t *data)
return(fabs(data->rotation) < eps &&
fabs(data->lensshift_v) < eps &&
fabs(data->lensshift_h) < eps &&
fabs(data->shear) < eps);
fabs(data->shear) < eps &&
fabs(data->aspect - 1.0f) < eps);
}
......@@ -3387,6 +3388,30 @@ void gui_post_expose(struct dt_iop_module_t *self, cairo_t *cr, int32_t width, i
cairo_stroke(cr);
}
// indicate which area is used for "near"-ness detection when selecting/deselecting lines
if(g->near_delta > 0)
{
float pzx, pzy;
dt_dev_get_pointer_zoom_pos(dev, pointerx, pointery, &pzx, &pzy);
pzx += 0.5f;
pzy += 0.5f;
double dashed[] = { 4.0, 4.0 };
dashed[0] /= zoom_scale;
dashed[1] /= zoom_scale;
int len = sizeof(dashed) / sizeof(dashed[0]);
cairo_arc(cr, pzx * wd, pzy * ht, g->near_delta, 0, 2.0 * M_PI);
cairo_set_source_rgba(cr, .3, .3, .3, .8);
cairo_set_line_width(cr, 1.0 / zoom_scale);
cairo_set_dash(cr, dashed, len, 0);
cairo_stroke_preserve(cr);
cairo_set_source_rgba(cr, .8, .8, .8, .8);
cairo_set_dash(cr, dashed, len, 4);
cairo_stroke(cr);
}
cairo_restore(cr);
}
......@@ -3439,7 +3464,7 @@ int mouse_moved(struct dt_iop_module_t *self, double x, double y, double pressur
}
// gather information about "near"-ness in g->points_idx
get_near(g->points, g->points_idx, g->points_lines_count, pzx * wd, pzy * ht, POINTS_NEAR_DELTA);
get_near(g->points, g->points_idx, g->points_lines_count, pzx * wd, pzy * ht, g->near_delta);
// if we are in sweeping mode iterate over lines as we move the pointer and change "selected" state.
if(g->isdeselecting || g->isselecting)
......@@ -3477,6 +3502,16 @@ int button_pressed(struct dt_iop_module_t *self, double x, double y, double pres
dt_iop_ashift_gui_data_t *g = (dt_iop_ashift_gui_data_t *)self->gui_data;
int handled = 0;
float pzx, pzy;
dt_dev_get_pointer_zoom_pos(self->dev, x, y, &pzx, &pzy);
pzx += 0.5f;
pzy += 0.5f;
float wd = self->dev->preview_pipe->backbuf_width;
float ht = self->dev->preview_pipe->backbuf_height;
if(wd < 1.0 || ht < 1.0) return 1;
// do nothing if visibility of lines is switched off or no lines available
if(g->lines_suppressed || g->lines == NULL)
return FALSE;
......@@ -3489,11 +3524,6 @@ int button_pressed(struct dt_iop_module_t *self, double x, double y, double pres
// in a rectangle area)
if((state & GDK_SHIFT_MASK) == GDK_SHIFT_MASK)
{
float pzx, pzy;
dt_dev_get_pointer_zoom_pos(self->dev, x, y, &pzx, &pzy);
pzx += 0.5f;
pzy += 0.5f;
g->lastx = pzx;
g->lasty = pzy;
......@@ -3511,6 +3541,11 @@ int button_pressed(struct dt_iop_module_t *self, double x, double y, double pres
// if we are zoomed out (no panning possible) and we have lines to display we take control
int take_control = (cur_scale == min_scale) && (g->points_lines_count > 0);
g->near_delta = dt_conf_get_float("plugins/darkroom/ashift/near_delta");
// gather information about "near"-ness in g->points_idx
get_near(g->points, g->points_idx, g->points_lines_count, pzx * wd, pzy * ht, g->near_delta);
// iterate over all lines close to the pointer and change "selected" state.
// left-click selects and right-click deselects the line
for(int n = 0; g->selecting_lines_version == g->lines_version && n < g->points_lines_count; n++)
......@@ -3604,11 +3639,69 @@ int button_released(struct dt_iop_module_t *self, double x, double y, int which,
dt_control_change_cursor(GDK_LEFT_PTR);
g->isselecting = g->isdeselecting = 0;
g->isbounding = ASHIFT_BOUNDING_OFF;
g->near_delta = 0;
g->lastx = g->lasty = -1;
return 0;
}
int scrolled(struct dt_iop_module_t *self, double x, double y, int up, uint32_t state)
{
dt_iop_ashift_gui_data_t *g = (dt_iop_ashift_gui_data_t *)self->gui_data;
// do nothing if visibility of lines is switched off or no lines available
if(g->lines_suppressed || g->lines == NULL)
return FALSE;
if(g->near_delta > 0 && (g->isdeselecting || g->isselecting))
{
int handled = 0;
float pzx, pzy;
dt_dev_get_pointer_zoom_pos(self->dev, x, y, &pzx, &pzy);
pzx += 0.5f;
pzy += 0.5f;
const float wd = self->dev->preview_pipe->backbuf_width;
const float ht = self->dev->preview_pipe->backbuf_height;
float near_delta = dt_conf_get_float("plugins/darkroom/ashift/near_delta");
const float amount = up ? 0.8f : 1.25f;
near_delta = MAX(4.0f, MIN(near_delta * amount, 100.0f));
dt_conf_set_float("plugins/darkroom/ashift/near_delta", near_delta);
g->near_delta = near_delta;
// gather information about "near"-ness in g->points_idx
get_near(g->points, g->points_idx, g->points_lines_count, pzx * wd, pzy * ht, g->near_delta);
// iterate over all lines close to the pointer and change "selected" state.
for(int n = 0; g->selecting_lines_version == g->lines_version && n < g->points_lines_count; n++)
{
if(g->points_idx[n].near == 0)
continue;
if(g->isdeselecting)
g->lines[n].type &= ~ASHIFT_LINE_SELECTED;
else if(g->isselecting)
g->lines[n].type |= ASHIFT_LINE_SELECTED;
handled = 1;
}
if(handled)
{
update_lines_count(g->lines, g->lines_count, &g->vertical_count, &g->horizontal_count);
g->lines_version++;
g->selecting_lines_version++;
}
dt_control_queue_redraw_center();
return TRUE;
}
return FALSE;
}
static void rotation_callback(GtkWidget *slider, gpointer user_data)
{
dt_iop_module_t *self = (dt_iop_module_t *)user_data;
......@@ -4210,6 +4303,7 @@ void reload_defaults(dt_iop_module_t *module)
g->isselecting = 0;
g->isdeselecting = 0;
g->isbounding = ASHIFT_BOUNDING_OFF;
g->near_delta = 0;
g->selecting_lines_version = 0;
free(g->points);
......@@ -4362,6 +4456,7 @@ void gui_init(struct dt_iop_module_t *self)
g->isselecting = 0;
g->isdeselecting = 0;
g->isbounding = ASHIFT_BOUNDING_OFF;
g->near_delta = 0;
g->selecting_lines_version = 0;
g->jobcode = ASHIFT_JOBCODE_NONE;
......
......@@ -521,7 +521,7 @@ void gui_init(dt_iop_module_t *self)
dt_bauhaus_combobox_set(g->mode, s_mode_local_laplacian);
gtk_widget_set_tooltip_text(g->mode, _("the filter used for local contrast enhancement. bilateral is faster but can lead to artifacts around edges for extreme settings."));
g->detail = dt_bauhaus_slider_new_with_range(self, 0.0, 500.0, 1.0, 100.0, 0);
g->detail = dt_bauhaus_slider_new_with_range(self, 0.0, 500.0, 1.0, 120.0, 0);
gtk_box_pack_start(GTK_BOX(self->widget), g->detail, TRUE, TRUE, 0);
dt_bauhaus_widget_set_label(g->detail, NULL, _("detail"));
dt_bauhaus_slider_set_format(g->detail, "%.0f%%");
......
/*
This file is part of darktable,
copyright (c) 2017 Heiko Bauke.
copyright (c) 2017-2018 Heiko Bauke.
darktable is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -524,6 +524,8 @@ static void transition_map(const const_rgb_image img1, const gray_image img2, co
static void guided_filter_tiling(const_rgb_image imgg, gray_image img, gray_image img_out, tile target, int w,
float eps)
{
// to process the current tile also input data from the borders
// (of size 2*w) of the neighbouring tiles is required
const tile source = { max_i(target.left - 2 * w, 0), min_i(target.right + 2 * w, imgg.width),
max_i(target.lower - 2 * w, 0), min_i(target.upper + 2 * w, imgg.height) };
const int width = source.right - source.left;
......@@ -553,13 +555,12 @@ static void guided_filter_tiling(const_rgb_image imgg, gray_image img, gray_imag
gray_image cov_imgg_img_r = new_gray_image(width, height);
gray_image cov_imgg_img_g = new_gray_image(width, height);
gray_image cov_imgg_img_b = new_gray_image(width, height);
gray_image var_imgg_rr, var_imgg_rg, var_imgg_rb, var_imgg_gg, var_imgg_gb, var_imgg_bb;
var_imgg_rr = new_gray_image(width, height);
var_imgg_gg = new_gray_image(width, height);
var_imgg_bb = new_gray_image(width, height);
var_imgg_rg = new_gray_image(width, height);
var_imgg_rb = new_gray_image(width, height);
var_imgg_gb = new_gray_image(width, height);
gray_image var_imgg_rr = new_gray_image(width, height);
gray_image var_imgg_gg = new_gray_image(width, height);
gray_image var_imgg_bb = new_gray_image(width, height);
gray_image var_imgg_rg = new_gray_image(width, height);
gray_image var_imgg_rb = new_gray_image(width, height);
gray_image var_imgg_gb = new_gray_image(width, height);
for(int j_imgg = source.lower; j_imgg < source.upper; j_imgg++)
{
size_t k = (size_t)(j_imgg - source.lower) * width;
......@@ -655,11 +656,16 @@ static void guided_filter_tiling(const_rgb_image imgg, gray_image img, gray_imag
box_mean(a_g, a_g, w);
box_mean(a_b, a_b, w);
box_mean(b, b, w);
for(int j_imgg = source.lower; j_imgg < source.upper; j_imgg++)
// finally calculate results for the curent tile
for(int j_imgg = target.lower; j_imgg < target.upper; j_imgg++)
{
size_t k = (size_t)(j_imgg - source.lower) * width;
size_t l = source.left + (size_t)j_imgg * imgg.width;
for(int i_imgg = source.left; i_imgg < source.right; i_imgg++, k++, l++)
// index of the left most target pixel in the current row
size_t l = target.left + (size_t)j_imgg * imgg.width;
// index of the left most source pixel in the curent row of the
// smaller auxiliary gray-scale images a_r, a_g, a_b, and b
// excluding boundary data from neighboring tiles
size_t k = (target.left - source.left) + (size_t)(j_imgg - source.lower) * width;
for(int i_imgg = target.left; i_imgg < target.right; i_imgg++, k++, l++)
{
const float *pixel = imgg.data + l * imgg.stride;
img_out.data[l] = a_r.data[k] * pixel[0] + a_g.data[k] * pixel[1] + a_b.data[k] * pixel[2] + b.data[k];
......
......@@ -1706,7 +1706,7 @@ static void lens_set(dt_iop_module_t *self, const lfLens *lens)
"focal range:\t%s\n"
"aperture:\t\t%s\n"
"crop factor:\t%.1f\n"
"type:\t\t\t%s\n"
"type:\t\t%s\n"
"mounts:\t\t%s"),
maker ? maker : "?", model ? model : "?", focal, aperture, lens->CropFactor,
lf_get_lens_type_desc(lens->Type, NULL), mounts);
......
......@@ -206,6 +206,9 @@ static void dt_iop_levels_compute_levels_automatic(dt_dev_pixelpipe_iop_t *piece
}
}
}
// for numerical reasons sometimes the threshold is sharp but in float and n is size_t.
// in this case we want to make sure we don't keep nan:
if(isnan(d->levels[2])) d->levels[2] = 1.0f;
// compute middle level from min and max levels
float center = d->percentiles[1] / 100.0f;
......
......@@ -454,6 +454,11 @@ static void _zoom_preset_change(int val)
scale = 2.0f;
zoom = DT_ZOOM_FREE;
}
else if(val == 4)
{
scale = 0.5f;
zoom = DT_ZOOM_FREE;
}
dt_dev_check_zoom_bounds(dev, &zoom_x, &zoom_y, zoom, closeup, NULL, NULL);
dt_control_set_dev_zoom_scale(scale);
......@@ -481,6 +486,10 @@ static void _zoom_preset_2(GtkButton *button, gpointer user_data)
{
_zoom_preset_change(3);
}
static void _zoom_preset_3(GtkButton *button, gpointer user_data)
{
_zoom_preset_change(4);
}
static gboolean _lib_navigation_button_press_callback(GtkWidget *widget, GdkEventButton *event,
gpointer user_data)
......@@ -507,6 +516,10 @@ static gboolean _lib_navigation_button_press_callback(GtkWidget *widget, GdkEven
g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(_zoom_preset_fit), self);
gtk_menu_shell_append(menu, item);
item = gtk_menu_item_new_with_label(_("50%"));
g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(_zoom_preset_3), self);
gtk_menu_shell_append(menu, item);
item = gtk_menu_item_new_with_label(_("100%"));
g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(_zoom_preset_1), self);
gtk_menu_shell_append(menu, item);
......
......@@ -2,13 +2,13 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
const char darktable_package_version[] = "2.4.3";
const char darktable_package_string[] = PACKAGE_NAME " 2.4.3";
const char darktable_package_version[] = "2.4.4";
const char darktable_package_string[] = PACKAGE_NAME " 2.4.4";
const char darktable_last_commit_year[] = "2018";
#else
#define DT_MAJOR 2
#define DT_MINOR 4
#define DT_PATCH 3
#define DT_PATCH 4
#define DT_N_COMMITS 0
#define LAST_COMMIT_YEAR "2018"
#endif
......@@ -134,7 +134,7 @@ profile_image() {
xmp="$scriptdir/profiling-shot.xmp"
noiseprofile="$scriptdir/darktable-noiseprofile"
if [ ! -x "$scriptdir/dt-noiseprofile" ]; then
if [ ! -x "$scriptdir/darktable-noiseprofile" ]; then
echo "ERROR: Could not find darktable-noiseprofile tool in $scriptdir"
exit 1
fi
......