Imported crop settings from Lightroom seems to lock on square aspect
When Darktable imports the crop settings from a Lightroom XMP file, everything works nicely until you try to edit the crop for the photo in Darktable. Then it directly switches to a square aspect crop, losing the settings imported from Lightroom.
I have attached an xmp-file for which this happens.
Fix aspect ratio computation.
It cannot happen in legacy_params() as at this point the size of the
image is not yet known. We then use a deferred circuitry to handle
this at the right point in the code.
#1 Updated by Jérémy Rosen almost 7 years ago
- % Done changed from 0 to 20
- Assignee set to Pascal Obry
- Status changed from New to Triaged
Assigning to pascal to check if it is lighroom import related, my guess is that it's either c&r acting weird again or the aspect ratio which is not set properly by the LR importer....
#2 Updated by Pascal Obry almost 7 years ago
Not a Lighroom import issue but a clipping iop one.
The issue is in clipping.c, routine legacy_params where we have:
const struct dt_interpolation* interpolation = dt_interpolation_new(DT_INTERPOLATION_USERPREF);
float whratio = ((float)(self->dev->image_storage.width - 2 * interpolation->width) * (fabsf(n->cw) - n->cx)) /
((float)(self->dev->image_storage.height - 2 * interpolation->width) * (fabsf(n->ch) - n->cy));
But at this stage the self->dev->image_storage.width and self->dev->image_storage.height are still 0 because the image is not yet fully loaded I suppose.
See pull-request to fix this.
#3 Updated by Pascal Obry almost 7 years ago
- % Done changed from 20 to 50
- Target version set to Candidate for next major release
- Status changed from Triaged to In Progress
Pull request is: https://github.com/darktable-org/darktable/pull/205