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

Deprecate use of the ScalerCropMaximum property #968

Closed
wants to merge 1 commit into from

Conversation

naushir
Copy link
Collaborator

@naushir naushir commented Mar 1, 2024

This will be dropped by libcamera. Instead, use the maximum value of the ScalerCrop control, which stores an identical rectangle.

@naushir
Copy link
Collaborator Author

naushir commented Mar 1, 2024

Don't know if there is a cleaner way to do this?

@naushir naushir force-pushed the next branch 2 times, most recently from 29cc7e8 to e584831 Compare March 5, 2024 13:38
This will be dropped by libcamera. Instead, use the maximum value of
the ScalerCrop control, which stores an identical rectangle.

Signed-off-by: Naushir Patuck <[email protected]>
@@ -92,7 +92,7 @@ def update_controls():
global scaler_crop

# Fix aspect ratio of the pan/zoom
full_img = picam2.camera_properties["ScalerCropMaximum"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually (and sorry to be a pain...) could we do

_, full_img, _ = picam2.camera_controls['ScalerCrop']

I feel camera_ctrl_info should probably be made private at some point, and it would avoid people diving into the libcamera structures and having to do type conversions.

@davidplowman
Copy link
Collaborator

Replaced by #973, so closing.

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

Successfully merging this pull request may close these issues.

2 participants