gpt4 book ai didi

css - Symfony2 AvalancheImagineBundle/调整图像大小

转载 作者:太空宇宙 更新时间:2023-11-04 12:27:04 24 4
gpt4 key购买 nike

如何在不裁剪图像的情况下使用 AvalancheImagineBundle 调整图像大小?

我的图片可以是 100x50 或 50x100,然后如果我将缩略图大小设置为 50x50,我将只有这些图片的中间部分(例如从 25 到 75 像素的高度)

    somewhat:
type: thumbnail
options: { size: [50, 50], mode: outbound, allow_upscale: true }

最佳答案

我在使用 Avalanche 时遇到了这个问题。这似乎是某种错误或缺少的功能(如果我错了请纠正我)。我建议您使用另一个包(另外,不再支持 Avalanche)。我在我的元素中使用 Liip:https://github.com/liip/LiipImagineBundle它基于 Avalanche,因此非常熟悉。在 LiipImagine 中,您可以使用以下方法实现您想要的:

foo_filter:
filters:
thumbnail: { size: [50, 50], mode: inset }

关于css - Symfony2 AvalancheImagineBundle/调整图像大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27938807/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com