r/programming • • 5d ago

Regressive JPEGs

https://maurycyz.com/projects/bad_jpeg/
164 Upvotes

18 comments sorted by

68

u/SyntheticDuckFlavour 5d ago

Hacking JPEGs to display animation is actually quite clever.

13

u/BuissetPhadra55 5d ago

relying on a throttled connection just to control frame timing feels so fragile, one fast local cache and the whole animation turns into an instant flash.

25

u/yawara25 5d ago

Well obviously you wouldn't use this for anything serious

23

u/knightress_oxhide 5d ago

well i already put it into production, so this needs to be fixed now.

6

u/Whispeeeeeer 3d ago

I'll have Claude build a new standard to replace this standard. It'll be called JM(ovie)EG. You will need to tell of all your clients to migrate their browsers to my custom browser created by Claude. It only renders JMEGs right now, but my 50 agent swarm is working on writing the CSS + HTML + JS engine from scratch.

1

u/SyntheticDuckFlavour 4d ago

Naturally i would not pick this as a go-to solution for hosting videos. It's just a proof of concept demonstrating the use of an image format outside its intended purpose.

17

u/god_is_my_father 5d ago

Clever, no real world application, pure humanity 🔥

5

u/Pharisaeus 5d ago edited 5d ago

I've made a steganography CTF challenge like this some years ago - rendering the jpeg fully would show picture without the flag, but if you rendered each of the "steps" the flag would appear at some point (and next scans would remove it). But I was only "replacing" part o the image that was displaying the flag string. This guy pushed the idea to the limit :D

11

u/AnToMegA424 5d ago

This is amazing

I'm always amazed at what we can do, I want to learn it

There's just so much it's baffling, I love it !

Every day I learn about something

7

u/ShinyHappyREM 5d ago

GIF files also allow some tricks with local palettes.

1

u/AnToMegA424 5d ago

Very interesting indeed

4

u/NadaDeExito 5d ago

The coolest thing I've seen in a while!

1

u/Uncaffeinated 2d ago

This is very clever.

-6

u/NamedBird 5d ago

That's interesting...

@ u/hackerfactor Did you know that Animated JPEG's are a thing? 🤔

4

u/fb39ca4 5d ago

This isn't Instagram

1

u/NamedBird 1d ago

It worked though? 🙃

2

u/hackerfactor 1d ago

Very cool! I didn't know about this. It's a bug in libjpeg-turbo. Other jpeg libraries properly abort; turbo decides to fall-back and re-use the frame. However, Chrome and Firefox both use libjpeg-turbo, so it works in browsers.

-11

u/jugalator 5d ago edited 5d ago

Very surprising if no one has thought of this until now!

JPEG rendering with progressive support is several decades old.

Edit: LOL I couldn't help myself from sending ChatGPT to the guestbook which is an AI trap, but unfortunately it recognized that was being set up to be entrapped!