No sharpening on export?

I’ve been using LR6, ON1 and DxO for a number of years and have just discovered darktable. I mostly prepare my photos for online presentation, so the usual treatment of exposure, white balance, sharpening etc. with export in the desired size and format as the last step.

All other RAW processors I know offer the posibility to sharpen the photo after scaling it down to the final size in the export module. There doesn’t seem to be any such option in the export module of darktable and the exported files look rather soft.

What am I missing?

Ralf

Salut/dag, @fotoralf.be, and welcome!

Some info for you: darktable lua documentation - RL_out_sharp

Have fun!
Claes in Lund, Sweden

To paraphrase Cartier-Bresson: Photographers, after all, aren’t programmers. :wink:

I’ll let my better half have a look. Thanks

Ralf

Photographers, after all, aren’t programmers

Ha! Don’t be so certain about that :-)))

1 Like

This photographer patently isn’t.

Oh, and maybe I should have mentioned that I’m using a Mac and the better half is a certified Mac hater.

Welcome!

Discovering darktable might be an important step starting an incredible journey :grinning:
We crush quite a lot of established dogmas here, like pixel-level sharpening.

Speaking of which, one of the suggested ways of increasing “sharpness” is operating on local contrast rather than introducing halos with an unsharp mask - you can do this (and more) using provided presets in diffuse & sharpen module.

The whole filimic RGB and scene-referred thing also has seen a lot of debate in recent years, but everything is well explained, like here:

Aurélien PIERRE - YouTube

or here:

Boris Hajdukovic - YouTube

Also, for great quick start:
Bruce Williams Photography - YouTube

2 Likes

Moin @Claes,

RL_out_sharp does not work on Macs. It requires additional software (GMic) to sharpen the image which is not available for the Mac.

It seems odd that DT has to fall back on an external sharpener program as it has its own sharpen function.

The problem here seems to be that Ralf wants to sharpen the image after it has been scaled down by the export module.

The hard way to achieve the functionality he’s looking for would be:

  • export the image to a lossless format while scaling it down
  • re-import the scaled version into DT
  • apply the sharpen function
  • then export it again (this time without scaling) into the final image format

I wonder if this can be automated…

Michael

This can actually be simplified, which what I use:

  1. export from dt
  2. run imagemagick that does both the resizing and the sharpening.

Here’s my script (on linux but I’m sure it could be easily adapted to mac or ms).

#/bin/bash
infile=$1
outfile=${infile%%.*}

[ $# -eq 0 ] && { echo "Usage: $0 [inputfile] to around 725px"; exit 1; }

echo $infile $outfile

convert $infile -sampling-factor 4:2:0 -strip -quality 70 -resize 450000@ -sharpen 0x0.5 "$outfile"-s0-05.jpg
convert $infile -sampling-factor 4:2:0 -strip -quality 70 -resize 450000@ -sharpen 0x0.8 "$outfile"-s0-08.jpg
convert $infile -sampling-factor 4:2:0 -strip -quality 70 -resize 450000@ -sharpen 0x1.0 "$outfile"-s0-10.jpg
convert $infile -sampling-factor 4:2:0 -strip -quality 70 -resize 450000@ -sharpen 0x1.3 "$outfile"-s0-13.jpg
convert $infile -sampling-factor 4:2:0 -strip -quality 70 -resize 450000@ -sharpen 0x1.6 "$outfile"-s0-16.jpg
convert $infile -sampling-factor 4:2:0 -strip -quality 70 -resize 450000@ -sharpen 0x2.0 "$outfile"-s0-20.jpg
convert $infile -sampling-factor 4:2:0 -strip -quality 70 -resize 450000@ -sharpen 0x2.5 "$outfile"-s0-25.jpg

the order of the convert is important

  • quality
  • resize by area or could be in pixels but then the portraits size are “too big”
  • the multiple sharpening is so I can judge which one is best.

Then I can pick the one that I like, which usually i’s the 0.8 or 1.0 sigma. 0x will let imagemagick calculate the optimum radius based on the image contrast.

1 Like

Moinchen @Karamike, and welcome!

Sorry, I am not a McPerson, so I have absolutely no idea
about what is/is not going on in those circles…
Off hand — why exit darktable at all?

Addendum: bad suggestion from me!
I just erased my faulty steps. :-1:

/Claes

…which takes us to the next question: How do I scale a photo in darktable?

Ralf

1 Like

Duh!
a) That was a very good question.
b) That was a very bad suggestion from me :-1:

Instead, see Karamike’s advice (above).

Sorry for the noise.
/Claes

See gmic — Homebrew Formulae

Or maybe apply the style during export?

I recorded a video how to that; unfortunately it didn’t grab the pop-up windows, but I hope it still can be helpful:

It would be important to check “High quality resampling” when exporting.

1 Like

Thank you, @Leniwiec, for the video.

As far as I understand it, a style is applied before the picture is scaled down.
What Ralf wants to achieve is to sharpen the picture after it has been scaled down.

Scaling a picture down will soften the edges (even sharpened ones).
So, a little bit of sharpening after scaling makes sense to me…
And as many other RAW development programs have this export option, it seems I’m not the only one.

I couldn’t find a “scale image” function in DT (except in the export module). So, making a script (style): “scale - sharpen - export” is not possible.

I’ll will give homebrew a try. However the GMic solution is cludge as it delegates functions that DT already posses to an additional external program.

Michael

1 Like