3 ms·
I am surprised that it survives twitter's image compression. I'm not familiar with JPEG format, but I'm familiar with PNG. I guess it's using some zlib-compress
by cowtools 4y ago
I am surprised that it survives twitter's image compression. I'm not familiar with JPEG format, but I'm familiar with PNG. I guess it's using some zlib-compressed EXIF-like metadata field, seeing as ZIP also uses DEFLATE/zlib/whatever?
- Retr0id 4y agoIt's embedded within an ICC colour profile, and therefore doesn't get touched by any image compression/resizing logic.
- Y-bar 4y agoSome eager image compression techniques will strip metadata including profiles (e. g. ImageOptim: https://imageoptim.com/color-profiles.html https://imageoptim.com/color-profiles.html) But generally you are correct.
- Retr0id 4y agoany image compression/resizing logic [in twitter.com] [in 2018]
- csdvrx 4y agoHow would do that nicely and automatically, to do funny things like that in a way that would be resistant to the accidental optimizations/resizing that will be applied to the JPG?
- charonn0 4y agoIt's a polyglot file. JPEG decoders will ignore data that comes after the end-of-data marker, while zip decoders ignore data that comes before the first archive entry. Essentially, they ran `cat pic.jpg arch.zip > output.jpg`.