Python实现base64编码文件转化为jpg/png/jpeg/格式图片

Python实现base64编码文件转化为jpg/png/jpeg/格式图片

这个base64文件是图片转化的才行,不是随便找个base64文件都行的

base64图片文件qiaoba.py

/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAA0JCgsKCA0LCgsODg0PEyAVExISEyccHhcgLikxMC4pLSwzOko+MzZGNywtQFdBRkxOUlNSMj5aYVpQYEpRUk//2wBDAQ4ODhMREyYVFSZPNS01T09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0//wAARCAHgAUADASIAAhEBAxEB/8QAGwABAAIDAQEAAAAAAAAAAAAAAAUGAQMEBwL/xAA/EAABAwMCBAQEBQMCBQMFAAABAAIDBAURITEGEkFRE2FxkRQigaEHMrHB0RUjQlLwJDM0YuEWNXJDRGOC8f/EABkBAQADAQEAAAAAAAAAAAAAAAABAgMEBf/EACYRAQEAAgICAgMAAwADAAAAAAABAhEDITFBBBITUWEiMnEUI0L/2gAMAwEAAhEDEQA/APSERFC4iIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIia9EBFpqKqnpWl1TURRADOXvA/VRE/F1jicWNrPGcNOWFpefso3EyW+InUVdHFTJP+ltVwlHQmMNB918O4huhGYrG/0fMAouUntb8eX6WVFVjxBfQcf0FmPKoz+yDia7aA2F2fKX/wo++P7T+PL9LSiq44rq26zWGrA7tcCvuPjS3c3LUQVdOeviRnAUzKX2i4ZT0sqKNpL5a6zHw9dCT/AKScH2KkQQQCCCDsQcq24rqzyyiIiBERAREQEREBERAREQEREBERAREQEREBERAREQERYJCDOiwSAM5A09go693mjslIaiseck4ZG3Vzz2A/dVOWe+cVYMhNsthP5Wk88g8z/sKtykm6vjhck1duMLdQSmmpw6sqthHDrg9iVES1fFl4OGujtdOejd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zoS4jRbYPw0ukmBVXCnjB3DQXH9l6kiLfaqVb/AMOrfT8vxtVNUtGzPytVroaCkt8IhoqeOFg6NGCfU7rqRRpW5W+WBssoilAiIgIiICIiAiIgIiICIiAiJlARMplAREQETKZQETKICLGUygyixlMoMosZWUBEWMoMosLKAiIgIiICLCygIiICIiAixlMoMosZTKDKLGUygyixlMoP/9k=

base64文件转为图片.png/.jpg/.jpeg,都行

# 已只读模式打开base文件
with open("qiaoba.py", "r") as f:
    data = base64.b64decode(f.read())
    # 生成图片
    file = open("qiaoba.png", "wb")
    file.write(data)

图片

Python实现base64编码文件转化为jpg/png/jpeg/格式图片_第1张图片

你可能感兴趣的:(python,python,base64)