Timber\Image: 是否可以将透明 PNG 拼合为特定的十六进制颜色?

Timber\Image: Is it possible to flatten a transparent PNG onto a specific hex color?

我想将透明的 PNG 转换为 JPG 并为透明区域指定背景颜色,而无需指定尺寸。

基本上,我正在寻找的是 Timber\Imagetojpg and letterbox 过滤器的组合,减去 letterbox 的宽度和高度要求。

@hailseitan:尝试通过 width()height() 方法获取图像的当前尺寸,然后将它们输入 letterbox!