小编had*_*dev的帖子

无法通过 instabot 将某些照片上传到 Instagram

我无法使用 instabot 将某些照片上传到 Instagram。有些图片可以正常上传,有些则不行。我无法上传的是我使用“Pillow”编辑的。这是我的代码,之后我将向您展示我尝试过的内容。

我使用 Pillow 的照片编辑功能:

def make_square(im, min_size=1080, fill_color=(255, 255, 255)):
    #here getting the width and the height of the picture and after that adjusting it's size for it to fit on a 1080px picture perfectly
    width, height = im.size
    ratio = 1080 / width
    width = width + 0.00
    height = height + 0.00
    width = width * ratio
    height = height * ratio
    height = math.floor(height)
    width = math.floor(width)
    im = im.resize((width, height)) #resizing the picture …
Run Code Online (Sandbox Code Playgroud)

python python-imaging-library instagram

3
推荐指数
1
解决办法
4146
查看次数

标签 统计

instagram ×1

python ×1

python-imaging-library ×1