Any plans to honor in-camera crops?

This isn’t something I use much, but if it was honored by my raw editor I might find more use for it. That is, setting the crop in-camera for compositional purposes, then seeing that crop automatically applied in ART (or darktable, etc.). Here’s how it looks in Canon DPP:

image

In practice I try to compose in-camera, but I usually end up hedging a bit and zooming out just a tad before shooting (to give myself wiggle room once I see the image on my computer). But with this I could be more exact in-camera.

Again, not something I’ve lost any sleep over :slight_smile: and I have no idea if it’s trivial or complex to implement. Just curious. I assume it’s non-proprietary as I’ve seen videos where it’s done in LR (not just the camera maker’s software). FWIW, I opened these images in darktable and the crop wasn’t honored there, either.

Thanks.

Hi,
See here:

I’m reading this on my phone with just-recently-awake eyes and brain :slight_smile: so I’ll need to read again once I’m fully alert, but… it looks like it’s possible to have a dynamic rule recreate the crop when it finds the appropriate tags.

If that’s correct, that works for me.

Thanks.

Yes, it is.

This little custom tag field is so inconspicuous but extremely helpful.

I made a brief attempt at finding the correct (i.e., complete hierarchical) exiv2 tags / names for my CR3s but was unsuccessful. I have the partial profiles created and they work, but don’t load automatically.

Initially, using exiftool I thought the correct tags were:

exiftool -s IMG_8329.CR3 | egrep -i "Cropped|AspectRatio"
AspectRatio                     : 4:3
CroppedImageWidth               : 5328
CroppedImageHeight              : 4000
CroppedImageLeft                : 336
CroppedImageTop                 : 0

exiftool -s IMG_8330.CR3 | egrep -i "Cropped|AspectRatio"
AspectRatio                     : 16:9
CroppedImageWidth               : 6000
CroppedImageHeight              : 3368
CroppedImageLeft                : 0
CroppedImageTop                 : 316

exiftool -s IMG_8331.CR3 | egrep -i "Cropped|AspectRatio"
AspectRatio                     : 1:1
CroppedImageWidth               : 4000
CroppedImageHeight              : 4000
CroppedImageLeft                : 1000
CroppedImageTop                 : 0

But the ART tooltip says the exiv2 syntax is required (which makes sense, given it’s using exiv2) and I can’t locate these tags with exiv2. There are a few similar tags, but I’ve not yet tried them all. Plus, I can’t find the fully qualified names, which I assume are required. Exif.Canon.<whatever> doesn’t work. There’s nothing obvious in the Metadata panel, either.

I’m apparently doing something wrong, so I need to read / Google more. I’ll have another go at it later – Too much else I need to get done at the moment to spend time on this. I just got home Thursday after a week away from home and have catch-up to do…

Thanks.

Try exiv2 -pa IMG_8329.CR3 | egrep ...

There might be Exif.Canon.AspectInfo. But I have no files to try.

Yep, I went down that road a bit but I must be blind. :slight_smile: I thought the correct tags were the Canon MakerNotes (Exiv2 - Image metadata library and tools) for 4:3, 16:9 and 1:1, respectively:

exiv2 -K Exif.Canon.AspectInfo IMG_8329.CR3
Exif.Canon.AspectInfo                        Long        5  2 5328 4000 336 0

exiv2 -K Exif.Canon.AspectInfo IMG_8330.CR3
Exif.Canon.AspectInfo                        Long        5  7 6000 3368 0 316

exiv2 -K Exif.Canon.AspectInfo IMG_8331.CR3
Exif.Canon.AspectInfo                        Long        5  1 4000 4000 1000 0

Parsing the first one out (per Canon Tags) gives this for 4:3…

Exif.Canon.AspectInfo=2
Exif.Canon.CroppedImageWidth=5328
Exif.Canon.CroppedImageHeight=4000
Exif.Canon.CroppedImageLeft=336
Exif.Canon.CroppedImageTop=0

…which looks right, but it doesn’t automatically apply. The camera name is copied from other rules which do work (and matches exif) so it must be the tags.

image

Then again, if exiv2 truly doesn’t report on Exif.Canon.CroppedImage* tags (which I find far less likely than me making a mistake!) it won’t work anyway. But that’s how it looks, superficially at least:

C:\data\images\_stage>exiv2 -K Exif.Canon.AspectInfo IMG_8329.CR3
Exif.Canon.AspectInfo                        Long        5  2 5328 4000 336 0

C:\data\images\_stage>exiv2 -K Exif.Canon.CroppedImageWidth IMG_8329.CR3

C:\data\images\_stage>exiv2 -K Exif.Canon.CroppedImageHeight IMG_8329.CR3

C:\data\images\_stage>exiv2 -K Exif.Canon.CroppedImageLeft IMG_8329.CR3

C:\data\images\_stage>exiv2 -K Exif.Canon.CroppedImageTop IMG_8329.CR3

C:\data\images\_stage>

Looks like I would try e.g. Exif.Canon.AspectInfo=2 5328 4000 336 0 as sole tag.

I know I tried the bare tag solo, and I think I tried the qualified name, too, unsuccessfully but will confirm.

Also, per the exiftool tag list it’s a 32 bit unsigned integer and matches the first value only. The other values match the Cropped* tags:

image

Have no idea. All I believe to know is that we need the data the way it’s shown in ART’s meta data tab:

grafik

But without a sample, I’m not getting anywhere else.

Well, dang…

image

I swear I tried it earlier (in fact, I know I did) and it didn’t work as a single tag. But now it does. Maybe I had errant characters in there or something. I even restarted ART between edits. But it works now!

So, for the benefit of anyone else with a Canon T8i / 850D (and maybe their other 24 mp sensor cameras?), here are the tag pairs:

Camera name - Canon EOS Rebel T8i
4:3 crop - Exif.Canon.AspectInfo=2 5328 4000 336 0
16:9 crop - Exif.Canon.AspectInfo=7 6000 3368 0 316
1:1 crop - Exif.Canon.AspectInfo=1 4000 4000 1000 0

Thanks.

2 Likes

Maybe a “reset to default / clear” thing.

grafik

If you use dynamic profiles and do clear, it will open the photo with the last used initial profile, I think. You should use Reset to default for testing, or even better completely unused photos to be sure.

On a side note to your original post. This wiggle room becomes critical when applying lens correction or perspective correction as some of the image is lost using those processes.

Before I was done, I was manually deleting the sidecars just to be sure… :smiley:

Good point, particularly perspective correction. In-camera cropping will tend to usually provide a little margin for error since the crop is virtual until applied in the raw editor. However, that’s true typically only along one axis, as the other is maximized as far as the aspect ratio will allow.

I was surpirised how much is lost with a straight JPG out of my camera compared to what exists on the edge of the frame in the RAW file. I presume the camera’s jpg has lens correction applied and this accounts for that.

Does it vary with lens, focal length, aperture, etc?

There are usually a few (very few) pixels stripped off the edges during demosaicing. But that should be visually unnoticeable.

So … can we talk userfriendliness for a moment? … yes you can do a lot of manual work … or we could have a checkbox for “apply vendor crop” … and it would be something that makes it 10x more usable for a beginner user than having to jump through all the hoops. and i would bet you it isnt that many lines of code to implement it.

2 Likes