Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 10 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
下载imagemagick(命令行成像工具)
convert image.png -rotate 10 10-image.png
< /p>转换 -page +0+0 image.png -page +32+0 10-image.png -马赛克 Final.png
您可以拥有任意多个
-page+X+Y imagefile
如你所愿就行了。最终图像的大小将根据您使用的页面位置的范围和输入文件的大小来计算。您可以将其与您选择的脚本语言结合在一起。如果您不想调用命令行工具,那么大多数主要语言都有绑定。
Download imagemagick (command-line imaging tools)
convert image.png -rotate 10 10-image.png
convert -page +0+0 image.png -page +32+0 10-image.png -mosaic final.png
You can have as many
-page +X+Y imagefile
as you want on the line. The size of the final image will be calculated from the extents of the page locations you use and the sizes of the input files.You can string this together with the scripting language of your choice. There are bindings for most major languages if you don't want to call out to command-line tools.
您可以脚本 GIMP 来做到这一点。
它是免费的并且非常强大。 这里是脚本教程。 这里是插件注册表。
You can script the GIMP to do that.
It is free and very powerful. Here is the scripting tutorial. And here a registry of plugins.
为了使 Ajax 旋转,我按照 Lou 的建议使用了 imagemagick ,但在“旋转”选项上遇到了麻烦因为它可以使图像变大(想象一个 45 度角的正方形)。
我发现解决方案是将“扭曲”选项与 ScaleRotateTranslate (SRT) 方法一起使用,仅使用旋转元素。这给了我我正在寻找的结果。
示例:
将a.png旋转33度并另存为b.png。
To make an Ajax spinny, I used imagemagick as per Lou's suggestion, but ran into trouble with the "rotate" option because it can make the image larger (imagine a square at 45 degrees).
I found the solution was to use the "distort" option with a ScaleRotateTranslate (SRT) method, only using the rotation element. This gave me the results I was looking for.
Example:
to rotate a.png by 33 degrees and save as b.png.