Comment on New Youtube Web Update Requires HTML5 Canvas
Celestus@lemm.ee 1 week agoThis is probably a clever way of doing native JPEG image conversion on the front end, instead of pulling in (or reimplementing) a universal image conversion library
LodeMike@lemmy.today 1 week ago
Yes because as we all know that’s too hard for Google to achieve.
Celestus@lemm.ee 1 week ago
Yeah, I bet it would be trivial for one of their engineers to whip up a universally compatible, hardware accelerated image file converter in JS, using no external dependencies, and less than 50 lines of code. Hint: it uses Canvas
LodeMike@lemmy.today 1 week ago
Yes because as we all know 100% of browsers have a canvas.
lime@feddit.nu 1 week ago
which ones don’t?
also, good goalpost moving.
Celestus@lemm.ee 1 week ago
Damn near 100%, yes
caniuse.com/?search=canvas
purplemonkeymad@programming.dev 1 week ago
It’s probably more of a scale thing, going a conversation server side need CPU time, if it can be done prior to upload then server time is reduced. I think a lot of websites do client side processing so they can do more requests per server instance.
kevincox@lemmy.ml 1 week ago
It would be wasteful to upload the full size image only to throw most of it away. JPEG compression is very cheap, especially at low resolutions (I assume that image search uses a pretty low-resolution source image). Doing it this way is actually what I would do for best user experience. (Not saying that they aren’t doing other malicious things, but doing the resizing on the client is actually a good idea)