Skip to main content
johnrellis
Legend
May 13, 2021
In Development

P: Correct copying of crops and local adjustments

  • May 13, 2021
  • 30 replies
  • 5294 views

[This version of the post from the old feedback forum was updated 11/1/21.]

 

Lightroom has long incorrectly copied crops and local adjustments between photos with different orientations. This post provides consistent principles of how copying should behave, test results of the current broken behavior, and a guide to implementing correct behavior.

 

How Copying Crops and Adjustments Should Behave

 

Users almost always place crops and local adjustments relative to the photo's content. A Spot Removal is placed over a blemish on a face; an Adjustment Brush lightens the shadows under eyes; a crop is placed tightly around a face; a Graduated Filter darkens the sky.

 

So if a user copies a crop or local adjustment from a raw to a TIFF produced from that raw by Photoshop, the user expects the adjustment to appear in the exact same visual position and have the same effect. A Graduated Filter aligned with the horizon in the raw should also be aligned with the horizon in the TIFF; a Spot Removal applied to a face blemish in the raw should be located on that blemish in the TIFF.

 

Problems

 

When a user edits a portrait raw in Photoshop, the saved TIFF will appear portrait. But internally, the orientations of the two photos are different – the raw pixels are stored in landscape with an orientation tag indicating a 90-degree rotation, while the TIFF pixels are stored in portrait with an orientation tag indicating no rotation.

 

When a user copies a crop or local adjustment between photos with different orientations or crops, LR usually copies the crop or adjustment incorrectly, placing it in the wrong location and with the wrong size. The precise behavior of LR has varied across versions, but it's never come close to being completely correct. 

 

I've done extensive testing of copying between orientations and crops, and the most recent results for LR 11.0 are posted below:
https://community.adobe.com/t5/lightroom-classic-ideas/lightroom-correct-copying-of-crops-and-local-adjustments-of-virtual-copies/idc-p/12489948#M13017

 

There hasn't been much change from LR 10.3, though LR 11 did fix one important use-case, copying adjustments between masters and their virtual copies.

 

Implementing the Desired Behavior

 

Implementing the desired behavior is straightforward, requiring elementary coordinate transformations from the source to destination photos. I've implemented these transformations for my Copy Settings, Any Crop, and Any Filter plugins, and I've posted the source code for Copy Settings plugin.

 

Internally, LR represents a photo as an underlying image (an array of pixels) and an "orientation" tag, which specifies how much the underlying image should be rotated (0, 90, 180, 270 degrees) and whether it should be mirrored to display it visually. Rotating or flipping an image in LR changes just the orientation tag. But when you edit a photo in Photoshop, it actually rotates and mirrors the pixels in the underlying image as specified by the orientation, and the saved TIFF will then have an orientation tag with no rotation or mirroring.

 

LR represents the coordinates of crops and local adjustments with values in [0..1], where (0, 0) represents the upper-left corner of the underlying image before any orientation (rotation and mirroring) has been applied. Call this coordinate system the underlying-pixels coordinates. Call the coordinate system after the orientation has been applied the visible-pixels coordinates.

 

When copying, LR should translate the underlying-pixel coordinates of the adjustments in the source image to visible coordinates. Then it should translate those visible coordinates to the underlying pixel coordinates of the target photo.

 

30 replies

Inspiring
June 30, 2021

@John_R_Ellis 

Hi John,

On my first synchronise I get this error:

An Internal Error Has Occurred:

CopySettings.lua:448: attempt to concatenate field 'y' (a nil value)

I tried doing a synchronise first which brought up this error. I then tried copying and pasting settings which came up with the same error.

Am I doing something wrong?

Participating Frequently
June 30, 2021

@John_R_Ellis 

[s] this is clearly impossible, you couldn't have done it on your own if the whole LR team and QA haven't managed to prioritize and nail it for so long. Please do not make us believe in unimaginable !!! [/sarcasm]

Thank you and great work as always, have been a happy user of some of your plugins!

Bob Somrak
Legend
June 29, 2021

I have a friend that used to use the Upright Mode and Upright Transform Syncing, Copying etc but pretty much gave up on these bugs being fixed after all this time. It should be embarrassing to Adobe to leave this unfixed for so long considering the issues are totally repeatable and easily duplicated.

M4 Pro Mac Mini. 48GB
johnrellis
Legend
June 29, 2021

I released the Copy Settings plugin, which correctly copies local adjustments, spot removals, transforms, and crops between photos. It also lets you define presets for which settings should be copied.  I'm hoping that Adobe will fix all the bugs with Copy/Synchronize Settings soon, but meanwhile, this plugin will get the job done.

The code that translates Develop settings from one photo orientation to another is just over 400 lines, and I've made it available here:

https://www.dropbox.com/s/vv4i6nr1z5h22a5/copy-settings.2021.06.29.lua?dl=0 

And below are the test results for the plugin.  Like the built-in Copy/Synchronize Settings commands, the plugin can't correctly copy Transform > Upright Mode and Upright Transforms -- I wasn't able to figure out how to work around the bugs. The plugin can copy Transform Adjustments in many but not all cases:

Todd Shaner
Legend
June 25, 2021

Great job John! Just as an FYI to everyone I first reported this issue in a post three years ago, which was merged to a newer post. So I can confirm this is at least a three year old problem, which remains uncorrected in LrC 10.3.

https://feedback.photoshop.com/conversations/lightroom-classic/lightroom-classic-synccopying-a-local-adjustspotcrop-results-in-wrong-size-and-position/5f5f46214b561a3d42751770?commentId=607dda9e3b0a051eac332ed9

johnrellis
Legend
June 24, 2021

I've constructed a semi-automated test suite for Copy / Synchronize Settings that can be run with about 15 minutes of effort:
https://www.dropbox.com/s/a10d49qc1m6c1f2/CopySettingstestsuite.2021.06.24.zip?dl=0 

The unzipped folder contains a _README.txt detailing how to run the suite and summarize the results in Excel.

The suite generalizes the results I presented above, testing combinations of rotation, cropping, and mirroring in the source and target photos, both unsaved and saved to metadata.

In the table below, the Source and Target representations are:

N - the photo is in normal orientation, with no rotation or mirroring (orientation AB)
C - same as N but with a crop applied, including a crop angle
R - the photo has been rotated clockwise (orientation BC)
RC - the photo has been rotated clockwise, with the same crop as C applied
RCM - the photo has been rotated clockwise and mirrored (flipped horizontal), with the same crop as C applied (orientation CB)

The adjustments tested are:

Crop -  a crop with a crop angle
Spot - a spot removal using Clone, with the source automatically selected
Graduated - a graduated filter, at angle
Radial - a radial filter, at angle
Up-Mode - Transform > Auto, copying Upright Mode
Up-Transforms - Transform > Auto, copying Upright Transforms
Tr-Adjustments - copying manual Transform adjustments

Some new observations: Copying Transform settings between different orientations doesn't work at all. Copying Transform > Auto with Upright Mode doesn't even work between photos with the same orientation!

Participating Frequently
June 11, 2021

Of course it will be the new standard (and has been for some time). It's all about them moneyzzz.

Earth Oliver
Legend
June 8, 2021

aren't you all putting the cart before the horse? Why would you choose to break workflows months and months before a new feature is released? Countless professionals use Classic to get their jobs done and now they have a much harder time doing so because the software is no longer working as expected. 
Is this going to be the new standard moving forward? 

johnrellis
Legend
May 13, 2021

Good                .

Rikk Flohr_Photography
Community Manager
Community Manager
May 13, 2021

@John_R_Ellis 

Thanks for the detailed report - it shows a lot of work and thought on your part. 

A few of the items in this list are active bugs scheduled for upcoming releases. It might be better to revisit this list after those are fixed to see what remainder we have that qualify for behavior change requests. 

Also keep in mind that some recent behavior changes are being made in conjunction with yet-to-be-released features that can't be discussed yet.

Rikk Flohr: Adobe Photography Org