Auto-crop from 'rotate and perspective' being disabled

I’ll submit a bug report if this isn’t a known thing; but several times in the last month I’ve seen this behavior. Briefly, I enable the rotate option and right click-drag a line to set the angle. When releasing the mouse button, the canvas is rotated but auto-crop doesn’t happen. Going to the module, auto-crop has been disabled. I re-enable it and all is well for a while but then it happens again.

Note that I’m not trying to correct perspective, just straighten the photo. I don’t see an option in dt to override auto-crop, and I do not have the module panel open when performing the edit so there’s no way I could have clicked on auto-crop to disable it. This probably happens once in a few hundred photos, but I often process albums of 2-300 photos so it pops up regularly.

It’s not a big deal because the next step for me is usually to crop the image and that takes care of it. However, I’m sure there are people who only want to correct the rotation and this might be a problem for them. Anyone else seeing this? If not, I’ll put in a bug report.

MacOS 15.7.4, dt 5.5.0+492~gb1c0b05524

2 Likes

I use the official/auto_straighten lua script that runs when I load an image in darkroom. It straightens but sometimes doesn’t auto crop, even though it’s set to. I’ve always assumed that it was due to the amount of automation that takes place when I load an image (applying a style, enabling modules, changing settings, etc.). It happens enough that I added a shortcut to the end of the auto_straighten script to toggle auto crop off and on so that I could force the image to get cropped. I’ll start checking to see if it’s disabled instead of just overwhelmed by processing.

EDIT: I checked and when it doesn’t and auto crop is set to original image, so it’s not turning off by itself.

1 Like

I’ve had this happen once recently after excessively drawing right-click lines multiple times because my mouse was acting up. I suspect there may actually be a problem.

1 Like

Someone, somewhere had an issue with the slider acting funny so I tested with multiple right clicks. I did manage to get extreme enough to get the slider to exceed it’s soft limits and shift the scale to the right but it still cropped every time, even when the crop got pretty extreme because of the rotation.

1 Like

It is pretty rare, and I’m afraid I can’t reproduce it at will - so far. It’s definitely toggling the auto-crop checkbox when it does fail, though.

1 Like

I have had this problem too.

I just right-click and draw wherever I happen to be in my workflow, Even after cropping, although I try not to as this is a bit stupid!

It has never been a problem until recently. I didn’t even know that the auto-crop option was there. I almost never use more advanced controls, so wasn’t familiar with the module layout.

I think it only began when I started building from git to get the ai masking to play with.

I’m currently on darktable 5.5.0+903~gae456d37b8.

Hardly possible, but hey… it seemed to break slowly! At first the rotate+crop slowed down. For the first time I could watch the two processes happening with a pause before crop.

Maybe it just gave up and switched itself off :wink: Like one of those boxes with a switch and a hand that comes out and turns itself off. Hahahaha… But the auto-crop-turns-off-somehow is real.

Also probably not related, stuff has changed in the crop module: the corner pointers have gone multi-colour, and it is hard to grab a side handle, as the grid boundary line is slightly outside the image and I only get corner pointers until I use one to bring the border line back in.

1 Like

OK, I found an image where this happens consistently and grabbed the dt error log. On the screen I get “automatic cropping failed” and the auto crop control resets. Interestingly, on this photo I also get the error when trying to turn auto-crop ‘on’. It didn’t do that previously.

darktable.log.zip (8.9 KB)

3 Likes

I thought I was just being careless with trying to grab the handles, but you’re right - the side handles don’t appear till I’ve slightly resized the crop area. A minor issue, but I guess this should be reported as well.

2 Likes

(This is fixed.) I don’t know if it’s related, but I’ve noticed the Crop or Rotate & Perspective modules sometimes never finish loading when an image is loaded in the darkroom. It repeatedly shows “Working…” and the image never loads, until the relevant module (it could be either) is turned off. Turning it on again after the image has loaded works.

In current master builds, this problem doesn’t exist anymore. It could be unrelated, but I’d better mention it just in case.

2 Likes