3 ms·
Once upon a time Facebook had a similar idea for their app [1] (similar to the OP's use case, because the preview photo was to be included to the initial respon
by lifthrasiir 9y ago
Once upon a time Facebook had a similar idea for their app [1] (similar to the OP's use case, because the preview photo was to be included to the initial response). It makes use of the stock JPEG decoder but with the fixed Huffman tree and size to meet the 200-byte size limit. A careful implementation may also work in the Web even without JavaScript.
[1] https://code.facebook.com/posts/991252547593574/the-technology-behind-preview-photos/ https://code.facebook.com/posts/991252547593574/the-technolo...