ImageMagick 文件缩放器类中的scale 和inflate 有何作用

发布于 2024-08-08 12:15:28 字数 435 浏览 3 评论 0原文

我正在通过 Symfony 使用 ImageMagick 在 PHP 中调整图像大小。

sfThumbnailer 类使用“scale”和“inflate”参数与 ImageMagick 进行交互。它们的作用是什么?它们将如何影响我的结果?

我意识到这是一个 RTM 问题,但我已经有了,而且文档不清楚。

Image Magick 文档

Symfony 缩略图文档

谢谢。

I am using ImageMagick via Symfony to resize images in PHP.

The sfThumbnailer class uses 'scale' and 'inflate' parameters to interface with ImageMagick. What do they do and how will they affect my results?

I realise this is a RTM question, but I already have, and the documentation is not clear.

Image Magick Documentation

Symfony Thumbnail Documentation

Thanks.

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

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

发布评论

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

评论(1

屋檐 2024-08-15 12:15:28

缩放

缩放保持纵横比。如果设置,则将保持纵横比。

Inflate

Inflate 告诉脚本在需要时向上缩放图像。即,如果设置为 true,则如果给定的宽度和高度大于原始宽度和高度,则可能会增加宽度或高度。

Scale

Scale maintains aspect ratio. If set, then aspect will be maintained.

Inflate

Inflate tells script to scale image upward if required. I.e. if set true, then it might increase the width or height if the given width and height are bigger than original width and height.

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