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.
我正试图用RMagick(ImageMagick)将图像包裹在一个圆柱体周围,并且我很难过。有几种类型的扭曲(桶,弧,仿射等)似乎是一个良好的开端,但没有什么真正适合。我也发现了很多复杂的命令行(复杂的数学运算),但这对RMagick没有多大帮助。 Fred的ImageMagick脚本包含一个cylinderize脚本,但它非常复杂,并且执行了很多命令行操作,我无法转换为RMagick调用。
Is there anyone out there that has done this before or can convert ImageMagick command lines to RMagick calls?
有人在那之前做过这个或者可以将ImageMagick命令行转换为RMagick调用吗?
1 个解决方案
#1
0
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.
只是为了捎带Ian所指出的 - 当你必须做ImageMagick调用时,绝对可以支持。 ImageMagick因导致内存泄漏和GC问题而闻名。
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.
在我支持的一个非常大的生产系统中,成像系统明确地没有链接到IM。相反,他们有一个表达式构建器类,它将构造正确的shell命令来进行转换。这是更多的工作,但也更稳定。
#1
0
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.
只是为了捎带Ian所指出的 - 当你必须做ImageMagick调用时,绝对可以支持。 ImageMagick因导致内存泄漏和GC问题而闻名。
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.
在我支持的一个非常大的生产系统中,成像系统明确地没有链接到IM。相反,他们有一个表达式构建器类,它将构造正确的shell命令来进行转换。这是更多的工作,但也更稳定。