I'm trying to wrap an image around a cylinder in RMagick (ImageMagick) and am having a tough time. There are several types of distortions (Barrel, Arc, Affine, etc.) that seem to be a good start but nothing really fits. I also uncovered a lot of complicated command line stuff (with complex math) but that doesn't help me much with RMagick. Fred's ImageMagick scripts contain a cylinderize script but it is pretty complex and does a lot of command line manipulation that I'm having trouble converting to RMagick calls.
Is there anyone out there that has done this before or can convert ImageMagick command lines to RMagick calls?