Hacker News new | past | comments | ask | show | jobs | submit login

You dont need to replace the img with canvas DOM - you can capture the canvas output as a dataURL.



Can't reply to the reply to your reply but... Blobs can be used here and avoid the inefficiency of data URL conversions


Thanks for the tip! (Not for jpegXL specifically, but ill definitely check that out and update some code where i use dataURLs instead of objectURLs accordingly)


This is exactly what I use in my JXL.js, as well as Web Workers and OfflineCanvas.


You can, but that is hugely inefficient. Any additional draw to the canvas has to generate a data URL for the image to be progressively decoded.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: