Hi Christian, I have considered (though not implemented) a similar case.
In my case, the correct thing to do would be to automatically enlarge the cropping area and recrop from the original file. What I would do is first just like you do : use darktable to export a JPEG. But I would consider that JPEG a "work print", and keep the original file and XMP at hand. Separately, a script would : * take as argument the original file and a new aspect ratio * parse the "work print" XMP * figure out the new crop area * generate a temporary XMP * call darktable-cli to generate the needed JPEG. That JPEG would have your aspect ratio. But I never implemented it and haven't actually checked how the crop information is stored in the XMP, if it's easy to parse and generate. Moreover, just enlarging the area to the requested aspect ratio might not always be what you need, and might not always be possible (for some aspect ratio, the enlarged area would in some case go outside the actual initial photo which might be a problem in your case). I'm curious about any other solution. My two cents. :-) On 18/11/2015 09:55, Christian Mandel wrote: > Hi, > > is it possible to write crop metadata (see > http://photo.stackexchange.com/questions/43893/how-to-store-tilt-rotation-and-crop-information-in-metadata, > xmp parameters for crop values) instead of actually performing the crop? > I guess it is not a standard feature (at least I did not find it) but > maybe it is possible with lua? > > The background: I do a lot of design work with photographs from dt > (calendars, photo books, etc.). Therefore, the photographs have to fit > within given frames. When I crop in dt (e.g. in 2:3 format) and use it > in a 4:5 template, I have to crop again, which is often not possible due > to losing important image parts. For these situations it would be better > to be able to "add" some picture at the other edges. Therefore, I have > to go back into darktable, crop different, export again and reuse the > image, which is cumbersome. > > Not cropping in dt is cumbersome as well since I want the exported image > to appear as intended and the changes to make the image fit are only > minor corrections, not changing the message of the image. Furthermore I > use the images in multiple “products”, e.g. calendar and photo book. > That means, I have to manually keep track of the initial intended crop > and reproduce it for every purpose. On the other hand, initially doing > multiple crops in dt would spam my lighttable and my export directories. > Therefore I think writing crop to image metadata and exporting full size > images sounds like a perfect idea. > > I guess the complementary functionality is not implemented in the tools > that I use down the chain (inkscape, scribus and image viewers), but I > have to start somewhere, and from the link above it does not sound too > hard to do it. > > Any hints welcome :-) > > Thanks & best regards > > Chris > > > ------------------------------------------------------------------------------ > _______________________________________________ > Darktable-users mailing list > Darktable-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/darktable-users -- Stéphane Gourichon ------------------------------------------------------------------------------ _______________________________________________ Darktable-users mailing list Darktable-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/darktable-users