You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under “Controlling the image dimensions” here it talks about partially decoding the image to fit a canvas element’s actual size... is there any way to partially load the FLIF resource as well, with, say, HTTP range requests?
The text was updated successfully, but these errors were encountered:
@eeeps Thanks for bringing it up. There are actually many related questions:
1. Can the user load a resource partially and pass it to our low-level API?
Yes, XHR allows partial content to be requested. This requires server side support and requires user to know in advance how much partial data to fetch.
fetch mentioned by @jnordberg might also be a good solution; I don't know much about it.
2. Can the user stream data to our low-level API, and stop the stream midway?
This would be the ideal solution. It would allow decoding to continue in parallel with data download, and stopping when the target resolution is reached. But this requires the decoding to yield to the JS event loop. It's a hard problem to solve; issue #19 tracks this.
3. Can the library automatically handle this for the declarative API?
Yes, if the partial size is indicated as an attribute. In this case, we can use the XHR partial content strategy.
Under “Controlling the image dimensions” here it talks about partially decoding the image to fit a
canvas
element’s actual size... is there any way to partially load the FLIF resource as well, with, say, HTTP range requests?The text was updated successfully, but these errors were encountered: