生成图像旋转版本的工具

发布于 2024-08-30 03:07:09 字数 1536 浏览 3 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

一枫情书 2024-09-06 03:07:09
  1. 下载imagemagick(命令行成像工具)

  2. convert image.png -rotate 10 10-image.png < /p>

  3. 转换 -page +0+0 image.png -page +32+0 10-image.png -马赛克 Final.png

您可以拥有任意多个-page+X+Y imagefile如你所愿就行了。最终图像的大小将根据您使用的页面位置的范围和输入文件的大小来计算。

您可以将其与您选择的脚本语言结合在一起。如果您不想调用命令行工具,那么大多数主要语言都有绑定。

  1. Download imagemagick (command-line imaging tools)

  2. convert image.png -rotate 10 10-image.png

  3. 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.

以往的大感动 2024-09-06 03:07:09

您可以脚本 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.

谜兔 2024-09-06 03:07:09

为了使 Ajax 旋转,我按照 Lou 的建议使用了 imagemagick ,但在“旋转”选项上遇到了麻烦因为它可以使图像变大(想象一个 45 度角的正方形)。

我发现解决方案是将“扭曲”选项与 ScaleRotateTranslate (SRT) 方法一起使用,仅使用旋转元素。这给了我我正在寻找的结果。

示例:

convert a.png -distort SRT 33 b.png

将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:

convert a.png -distort SRT 33 b.png

to rotate a.png by 33 degrees and save as b.png.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文