Skip to content

Add webp support to px.imshow #4797

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix formatting issues not caught by pre-commit
Signed-off-by: maximsmol <1472826+maximsmol@users.noreply.github.com>
  • Loading branch information
maximsmol committed Oct 11, 2024
commit d55c09fdefe6316972f31abafdd1b6668d2733f9
4 changes: 2 additions & 2 deletions packages/python/plotly/_plotly_utils/data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def image_array_to_data_uri(
greyscale=(ndim == 2),
alpha=alpha,
compression=compression,
**backend_kwargs
**backend_kwargs,
)
img_png = from_array(img, mode=mode)
prefix = "data:image/png;base64,"
Expand Down Expand Up @@ -92,7 +92,7 @@ def image_array_to_data_uri(
format=ext,
compress_level=compression,
lossless=True,
**backend_kwargs
**backend_kwargs,
)
base64_string = prefix + base64.b64encode(stream.getvalue()).decode("utf-8")
return base64_string