gpt4 book ai didi

Facebook、opengraph,它们是如何裁剪的?

转载 作者:行者123 更新时间:2023-11-30 05:23:01 29 4
gpt4 key购买 nike

我有一个网站,在 <meta property="og:image" content="image.jpg" /> 中适本地列出了一个简单的 500x500 图片

Facebook 有时会裁剪并使用图像的顶部、中间或在某些情况下使用底部以获得所需的纵横比。我可以做些什么来控制它吗?或者更好的是,让它像所有其他社交网站一样获取整个方形图像?

In my findings if your image is not 600x315 1200x630 or other 40:21 ratio facebook has a three step algorithm for determining what to crop as outlined below.

FINDINGS:

First Priortiy: Face detection. Detects center point of faces. If multiple faces determines the ones that are closest together and bases the crop on that.

Second Priority: Some sort of contrast detection: Detail > Colors > Contrast. So if you had a picture of a face on the top of an image and the rest of the image was blurred out because the picture was taken with an extremely low aperture. Then, if you have a lot of colors in a certain part of an image it would favor that and then if there was a really dark image that had a bright white watermark in the bottom right hand corner it would favor that.

Third Priority: This is more of a default, if the above two don't work, it defaults to a center crop.

最佳答案

在 facebook 上搜索后,我找到了 this有关 facebook 推荐的图像尺寸和纵横比的文章。

我没有亲自尝试过,但是 this StackOverflow 问题说他们已经尝试了文章中推荐的 facebook。

我将尝试实现 Facebook 上推荐的图片尺寸,并适本地编辑答案。

希望这对您有所帮助。

关于Facebook、opengraph,它们是如何裁剪的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20917448/

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