开发者

How do I get RMagick to wrap images around a cylinder?

I'm trying to wrap an image around a cylinder in RMagick (ImageMagick) and am havi开发者_高级运维ng 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?


Just to piggyback on what Ian pointed out - it is absolutely okay to shell out when you have to do ImageMagick calls. ImageMagick is known for causing memory leaks and GC problems.

In one very large production system I supported, the imaging system explicitly did not link against IM. Instead, they had an expression builder class that would construct the right shell command to do the conversion. It was more work, but also more stable.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜