Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New feature: take account of cropping in Camera Raw et al. #8

Open
tomkyle opened this issue May 22, 2017 · 2 comments
Open

New feature: take account of cropping in Camera Raw et al. #8

tomkyle opened this issue May 22, 2017 · 2 comments

Comments

@tomkyle
Copy link
Owner

tomkyle commented May 22, 2017

After shooting your negatives it may be useful to crop the RAW files first to get rid of unneeded parts of the negative holder. linear_tiff should consider this crop data and crop the output image accordingly. Example workflow:

  1. User shoot negative, crop RAW in Camera Raw. Crop data is now in XMP sidecar file.
  2. Run linear_tiff:
    • linear_tiff runs dcraw. The resulting TIFF file should be (surely is?) uncropped.
    • linear_tiff runs mogrify and crops the output according to the crop data in XMP file.

The crop data are stored like this: http://www.exiv2.org/tags-xmp-crs.html and can be extracted.

I am not sure about how Lightroom and other RAW converters handle this.

@tomkyle
Copy link
Owner Author

tomkyle commented May 22, 2017

The crop information can be extracted with exiftool . The output values are percentage. While ImageMagick does accept width and height as percentage, the crop offsets seem to have to be in pixels. This article describes how: http://infoheap.com/crop-image-using-imagemagick-convert/

Here's a small script that prints a crop summary for development work: https://github.com/tomkyle/show-crop

@tomkyle
Copy link
Owner Author

tomkyle commented Jun 1, 2017

As of release 1.1.2 and 1.1.3, the output file is now cropped when the input file's meta data have crop information stored, even in an XMP sidecar file.

Currently, crops with angles other than 0 are not supported. The reason, I simply did not experiment with it. Has someone experience on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant