Skip to content

src/NbtEditor: compability with code-server#84

Open
Sodium-Aluminate wants to merge 1 commit into
misode:masterfrom
Sodium-Aluminate:patch-1
Open

src/NbtEditor: compability with code-server#84
Sodium-Aluminate wants to merge 1 commit into
misode:masterfrom
Sodium-Aluminate:patch-1

Conversation

@Sodium-Aluminate
Copy link
Copy Markdown

Encountered a SecurityError when calling atlasCtx.getImageData, due to the canvas being tainted by a cross-origin image. As outlined in MDN documentation, this happens even if the image server sends appropriate CORS headers — unless the <img> element explicitly includes the correct crossorigin attribute.

To resolve this, the <img> element used to draw the image to the canvas should include the crossorigin attribute. See HTMLImageElement.crossOrigin for details on valid values.

@suzakuwcx
Copy link
Copy Markdown

Here is the result

image

Before

image

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