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

Add image decoding to CameraFrustumHandle when ._image is set via binary #368

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

abcamiletto
Copy link

Related to #351

To speed up image visualization in Camera Frustum by loading directly from disk it is possible to do

from pathlib import Path

frustum_handle._image_data = Path("some_image.jpeg").read_bytes()
frustum_handle.image_media_type = "image/jpeg"

This creates a weird situation where frustum_handle.image is None because the internal ._image was never set.

This PR fixes that behaviour by decoding the ._image_data attribute if it exists and ._image is None

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.

1 participant