2024-09-25 04:33:21 发布
网友
我使用convert Imagemagik实用程序创建灰度jpg图像。需要帮助在Python中找到等效的实用程序。我尝试了PIL,但这会创建png图像。 我想通过python调用“convert”实用程序。还有比这更好的解决办法吗。 我想在tensorflow中输入图像。问题是我使用的是tensorflow 1.1
嗯?这可以很好地工作并创建一个灰色JPEG:
from PIL import Image image=Image.open('start.png') grey=image.convert('L') grey.save("result.jpg")
嗯?这可以很好地工作并创建一个灰色JPEG:
相关问题 更多 >
编程相关推荐