gpt4 book ai didi

firebase - 使用 firebase resize images extension 动态调整图像大小

转载 作者:行者123 更新时间:2023-12-04 15:32:54 24 4
gpt4 key购买 nike

在我们的 Firebase 存储中,我们有宽度为 1080 和不同高度的图像。使用此扩展程序 (https://firebase.google.com/products/extensions/storage-resize-images),我们需要将宽度调整为 480,保持纵横比。如何使用此扩展来实现这一点?它允许我们指定维度,但不是我们需要的。

如果此扩展程序无法做到这一点,有哪些类似的替代方案?

最佳答案

来自 here

For example, say that you specify a max width of 200px and a maxheight of 100px. You upload an image that is 480px wide by 640px high,which means a 0.75 aspect ratio. The final resized image will be 75pxwide by 100px high to maintain the aspect ratio while also being at orunder both of your maximum specified dimensions.

我最初也对此感到困惑。总之,您指定的维度是任一维度的最大值;根据纵横比,将使用这些值中的一个或两个,并且纵横比将始终保持不变。

关于firebase - 使用 firebase resize images extension 动态调整图像大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60831732/

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