Hello Mark,

On Thu, 13 Dec 2018 00:43:17 +1100, Mark Feit <mf...@notonthe.net> wrote:

On 12/11/18 10:07 PM, Terry Duell wrote:

The requirement for uncropped images seriously complicates the task if using darktable-cli. The request is to have a 'crop=0' switch (or similar) for darktable-cli...if that is possible, and reasonable.

That would start a trend of having to propagate a lot of switches out to darktable-cli, which wouldn't end well. Everything needed to bend darktable to your will is already in the sidecar (XMP) file that goes with each image. What's missing is an alternate sidecar with the cropping turned off that could be handed to darktable-cli.

I did the following manually for a single image and it produced the right thing:

1. Make a copy of the image's sidecar file (cp image.nef.xmp image.nef.xmp-nocrop).

2. Edit the copy (vi image.nef.xmp-nocrop), locate all of the rdf:li items where darktable:operation is "clipping" and change darktable:enabled to "0". This process can be automated with xsltproc or XMLStarlet. The latter is available on all three of the platforms where darktable is supported. (You could probably get away with some sneaky sed-based tricks, but I don't recommend that because the arrangement of the XML shouldn't be considered stable. Use the right tool for the job.)


This is pretty much the solution that Patrick proposed.
I did a test with one file where I set enabled to 0 for clipping and it didn't have any effect, and the prospect of attempting using sed or similar to edit the xmp to remove all clipping instructions was beyond my abilities. I'll have to look at that again, as there may have been another clipping command later in that xmp.

3. Run darktable-cli against the image and edited XMP to produce an uncropped version of the image (darktable-cli image.nef image.nef.xmp-nocrop image-uncropped.jpg).

4. Harvest the uncropped image for distribution and remove it and the edited sidecar if you don't want to keep them around.


Turning it into a shell script that can operate against any set of files you choose should be an easy exercise. (It's an interesting enough problem that I might do it myself.)

If you attempt this please let me know how you get on and pass on your scripts if you are prepared to do so.

Thanks for your contribution.
At least there two other users that see the problem is a bit more than simply trying apply an export style.

Cheers,
--
Regards,
Terry Duell
___________________________________________________________________________
darktable developer mailing list
to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org

Reply via email to