Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradual Rendering of Progressive Images in HTML5 Canvas

Is there a way to draw partially loaded progressive Image objects (PNG, JPG) into canvas?

Most browsers support progressive loading in the tag, but I can't find how it can be controlled in within canvas.

like image 531
seva.lapsha Avatar asked Oct 24 '25 12:10

seva.lapsha


1 Answers

The answer is no, as per the specification's orders.

If a browser does happen to do this, it is against the spec, which states:

If the image isn't yet fully decoded, then nothing is drawn.

When an img element is in the completely available state and the user agent can decode the media data without errors, then the img element is said to be fully decodable.

like image 63
Simon Sarris Avatar answered Oct 26 '25 02:10

Simon Sarris



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!