If I understand correctly, you want to take the first image, and execute some process on it, and have the result be like the second image. I do not know of any way to do that; however, if you have your own art work, you could use a program like Macromedia Flash, or Adobe Image Ready to make animated .gif files. If you goal is to turn someone elses image into a animated image I do not know of anyway to do that.
If however on the other hand you just want to make your image look jaged, you can probably use a filter in Adobe Photoshop to achieve that effect.