Skip to content

Improve Image property and use it in ImageURLTexture.url#14371

Merged
mattpap merged 2 commits into
branch-3.7from
mattpap/14369_ImageURLTexture_url
Feb 28, 2025
Merged

Improve Image property and use it in ImageURLTexture.url#14371
mattpap merged 2 commits into
branch-3.7from
mattpap/14369_ImageURLTexture_url

Conversation

@mattpap

@mattpap mattpap commented Feb 27, 2025

Copy link
Copy Markdown
Contributor

I changed Image.transform() to better reflect its docstring and promised functionality. I also changed ImageURLTexture.url to use Image instead of plain string. This way locally referenced resources can be inlined.

fixes #14375

@mattpap mattpap added this to the 3.7 milestone Feb 27, 2025
@mattpap mattpap force-pushed the mattpap/14369_ImageURLTexture_url branch 2 times, most recently from 64e6ed6 to 4025e3d Compare February 28, 2025 07:41
@mattpap

mattpap commented Feb 28, 2025

Copy link
Copy Markdown
Contributor Author

Even with inlined SVG this still doesn't work in Firefox.

@bryevdv

bryevdv commented Feb 28, 2025

Copy link
Copy Markdown
Member

Even with inlined SVG this still doesn't work in Firefox.

Unless you think it just can't be fixed for FF, I'd suggest making a new issue for the improvements and merging this PR for that issue now, and keeping #14369 open to investigate later.

protocol (utf-8 encoding for ``*.svg`` and base64 for ``*.png`` and
other binary formats).

NumPy 2D arrays are also supported and use ``data:`` encoding as well.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

FWIW suggest we deprecate url soon and eventually replace with a better name that actually encompasses that images are also valid values

@mattpap

mattpap commented Feb 28, 2025

Copy link
Copy Markdown
Contributor Author

Unless you think it just can't be fixed for FF, I'd suggest making a new issue for the improvements and merging this PR for that issue now, and keeping #14369 open to investigate later.

Adding width and height to <svg> resolves the problem. I opened new issue for this PR. I will see later if anything can be done when width and/or height are missing.

@mattpap mattpap force-pushed the mattpap/14369_ImageURLTexture_url branch from bb29cf7 to d0387f6 Compare February 28, 2025 22:38
@mattpap mattpap merged commit f2f89af into branch-3.7 Feb 28, 2025
@mattpap mattpap deleted the mattpap/14369_ImageURLTexture_url branch February 28, 2025 23:04
@github-actions

Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use Image property type in ImageURLTexture.url

2 participants