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

Pixel aspect support? #38

Open
virtualritz opened this issue Jun 6, 2024 · 5 comments
Open

Pixel aspect support? #38

virtualritz opened this issue Jun 6, 2024 · 5 comments

Comments

@virtualritz
Copy link

It would be great if the crate also returned a num-rational::Ratio pixel_aspect for image formats that support this.

This would just be 1:1 for any image format that doesn't, or if absent.

@Roughsketch
Copy link
Owner

I'm not entirely opposed to potentially getting this info, but I want to try to not rely on any external creates, sans dev dependencies.

Is there a flow that would require this information? How would you anticipate it fitting into the current library? Curious about how you'd want it to work.

@virtualritz
Copy link
Author

When you want to call an external tool to resize an image, e.g. for a preview, it is often preferable to make sure the latter has a pixel aspect of 1:1.

Particularly OpenEXRs that were converted from CinemaDNGs shot with anamorphic lenses will often have 1:1.33 or 1:2 pixel aspects and need non-linear scaling to display correctly.

@Roughsketch
Copy link
Owner

How would you want it integrated into the library? My first thought would be a pixel_size method that returns a new struct called PixelSize which seems simple enough.

Also if you happen to know which file types support different pixel sizes please let me know.

@virtualritz
Copy link
Author

virtualritz commented Jun 9, 2024

Yes, that sounds good. But it would be pixel_aspect which is short for pixel aspect ratio which is what literature and industry have settled on, as a term for this, since decades.

@virtualritz
Copy link
Author

I also suggest to put this behind a feature flag. 😁

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

No branches or pull requests

2 participants