Crop window should "stick" to transformed pixels

Thanks to the RawTherapee developers for this great program. There is just one annoying use case I don’t fully understand the reason for the ‘as is’ state and why I haven’t seen it reported as a bug. What’s the best way to help getting this done as a non-programmer? The functionality is non-intuitive and I haven’t seen it in any other graphics software:

  1. Early on in developing I decide on a crop
  2. Very late in development I try to mirror or rotate the image.

What I expect to happen is mirroring within the cropped picture. On a more technical level: The crop window coordinates should “stick” to the pixels below them, also needing some transformation.

In fact the order seems to be

  1. Perform mirroring on the uncropped image
  2. Crop coordinates are not affected, e. g. the crop that was on the left part of the image now contains pixels from the (mirrored) right part of the image. This typically is some unrelated, boring part of the image I wanted to get rid of.
  3. As a correction I have to re-select the crop

you put this in the darktable category but you then mention RawTherapee. So not sure how to answer…

2 Likes

So far, in using darktable, I have not wanted to flip an image. So I tried…

I cropped the picture keeping the crop at top right.

I flipped the picture horizontally.

The crop is still at top right, so I no longer have the content I chose in my crop frame.

Whether or not dt/rt was a slip of the OP’s tongue or fingers, the behaviour that he describes happens in darktable.

Not unexpected.
In darktable, modules do not get information from other modules, other than the image itself (which they get from the immediately preceding module). “Crop” comes after “orientation” (where you can flip the image), and it applies the crop to the image it gets. But when you mirror the image, the crop module cannot know that that happened.

As formulated, the suggestion would be a bad one anyway: do you really want a crop to rotate or deform with the image (“rotate and perspective”, “lens correction”), resulting in an extra crop, or black surroundings (as images have to be rectangular in all image formats I know of)

2 Likes

that behaviour results from the default pixelpipe: such transformations are applied before crop by default (lower position of the module on the right panel) even if they’re made after cropping in users workflow.
have a look at darktable 4.6 user manual - the pixelpipe & module order - a basic understanding of the pixelpipe is mandatory to get expected results using darktable

2 Likes

Thank you both

At first sight, it seems an inconvenience, but put within the context of how darktable works, it’s understandable.

1 Like

I can confirm it does not happen in RawTherapee:


Also tried first flipping, then cropping, and finally undoing the flip.

2 Likes