-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Error loading image for billboard: InvalidStateError: The source image could not be decoded. #7700
Comments
Thanks for reporting this @tangtony! We'll look into this and get it fixed for the next release |
@OmarShehata are you the best one to take a look at this? |
Yeah, I know why this is happening. It's because of the switch to using You can confirm this by overriding the supports bitmap check to disable it at the top of your Sandcastle:
|
The good news is that data URIs in general should work fine with |
We do intentionally fetch the given image as a blob before decoding it, since that allows the browser to move the expensive decode off the main thread. It looks like browsers don't support decoding vector data as a blob. From the spec:
Another workaround is to wrap the data URI in an image element before passing it in in your application:
I think the right fix is to essentially have |
Fixed in #7701 and published a 1.56.1 release with the fix: https://github.com/AnalyticalGraphicsInc/cesium/releases/tag/1.56.1 |
Billboards loaded via a data-uri seem to have stopped working in Cesium v1.56.
Sandcastle example:
v1.55 (Working):
https://cesiumjs.org/releases/1.55/Apps/Sandcastle/index.html#c=ZVHLbsIwEPwVKxdABTs0ICgNUSV6rNRDpZ5yceIlsXBsZJsEWvHvXROo+vBpZrwz61233JJWQgeWrImGjmzAyUND3y/acFBe6MZoz6UGOxg95jrXvYOC9tJLcJQLMfzMNcGzNw41o8nqFrXh1iPiOqFba5pnqCyAG04Wczp/WCwWYzKLaZwsl8lo3GcUUqnCcCvI6poajmx4BRg7ENzz1YUx11Z3x0aNUwSkBeuw8zqPpnSaRwQvtENWe79fMdZ1He0SamzF7uM4Dl4s6qTwdbDEMbIaZFX7G83SUtpSASmPKM1DQXm6IYtgFoDz1uwAWaF4ufsWJrfkBKUtToTQgsgjlqWhdzboRzvn+hy2Go2j1PmTgqzXn2SzN9aTg1VDSpmHZq84LpIVh3IHnpbOBRtmXU2pkC2RAtv8+bTwbMVdWMX2oNSb/IAwG8P6XzZluJC6esU9Kn4KJfU0e+lFSmnKkP53eWNUwe2PxC8
v1.56 (Not working): https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/#c=ZVHLbsIwEPwVKxdABTs0ICgNUSV6rNRDpZ5yceIlsXBsZJsEWvHvXROo+vBpZrwz61233JJWQgeWrImGjmzAyUND3y/acFBe6MZoz6UGOxg95jrXvYOC9tJLcJQLMfzMNcGzNw41o8nqFrXh1iPiOqFba5pnqCyAG04Wczp/WCwWYzKLaZwsl8lo3GcUUqnCcCvI6poajmx4BRg7ENzz1YUx11Z3x0aNUwSkBeuw8zqPpnSaRwQvtENWe79fMdZ1He0SamzF7uM4Dl4s6qTwdbDEMbIaZFX7G83SUtpSASmPKM1DQXm6IYtgFoDz1uwAWaF4ufsWJrfkBKUtToTQgsgjlqWhdzboRzvn+hy2Go2j1PmTgqzXn2SzN9aTg1VDSpmHZq84LpIVh3IHnpbOBRtmXU2pkC2RAtv8+bTwbMVdWMX2oNSb/IAwG8P6XzZluJC6esU9Kn4KJfU0e+lFSmnKkP53eWNUwe2PxC8
Browser: Google Chrome 73.0.3683.86
Operating System: Windows 10, 64-bit
The text was updated successfully, but these errors were encountered: