Twitist Forums
Animated picture in facebook? - Printable Version

+- Twitist Forums (http://twitist.com)
+-- Forum: Facebook forums (/forum-14.html)
+--- Forum: General facebook and life forums (/forum-25.html)
+--- Thread: Animated picture in facebook? (/thread-82265.html)



Animated picture in facebook? - Enn - 08-30-2013 07:18 PM

I came accross a photo in facebook that is animating but in jpg format. As far as I know only gif can animate. So how is this possible? Reference image:

https://fbcdn-sphotos-e-a.akamaihd.net/hphotos-ak-frc1/251820_447832188581840_821313291_n.jpg

From

https://www.facebook.com/photo.php?fbid=447832188581840&set=p.447832188581840&type=1&theater


- Daniel - 08-30-2013 07:23 PM

Well, the thing is that the image you see of Mario isn't actually a JPG but a GIF, the person who uploaded just changed the extension of the file (GIF) to JPG and your browser (that's clever enough to know that the image is actually a GIF and not a JPG) plays the animation.

If you open an image with a text editor (say, notepad or word or something) the editor is (naively) interpreting the bytes of the file as some character encoding, the browser kind of does the same thing, when you change the extension of a picture without the use of any image editing software, it doesn't really change the extension, just the name of the file, and when the browser (just like the text editor) starts interpreting the bytes of the picture, it can tell it's a GIF and not a JPG from the byte signature in the file.

You can try this yourself, find a nice GIF that you like, rename it on the folder and open it on your browser, it's still gonna move like a GIF, now, if you use GIMP or Photoshop or Paint with the image and save it as a JPG, it will indeed lose it's animation.

I've seen several images like this myself, still haven't figured how to actually upload them, but I did do some reading on the matter and that is basically the only way to do it. I believe the trick on achieving this is uploading the image without it being compressed by the Facebook uploading system, which I have no idea how to bypass, I'd really like to... Sadly I can't really tell you how to.

Hope it helped!