Is there a way to bend, twist, slice images (jpg) imports?

I saw a picture of a horse turned into a flag waving in the breeze, using something called anfyFlash (or amfyFlash).

Is there a way this can be done without, for eg, splitting an image into many vertical slices and then apply a sine wav. That is, is it possible to just load any image, complete, and apply some magic? Without blowing out the file size or overloading memory?