相关疑难解决方法(0)

在python中创建具有一定宽度边框的图像

我用过 PIL

#back_color_width 

for x in range(w):
    for y in range(h):
        if x==0 or y==0 or x==w-1 or y==h-1 :
            pixels[x,y] = back_color
Run Code Online (Sandbox Code Playgroud)

我需要在图像的所有 4 个边上为图像添加一个边框

python image-processing python-imaging-library python-3.x

5
推荐指数
2
解决办法
2582
查看次数