1. <i id='HMau3'><tr id='HMau3'><dt id='HMau3'><q id='HMau3'><span id='HMau3'><b id='HMau3'><form id='HMau3'><ins id='HMau3'></ins><ul id='HMau3'></ul><sub id='HMau3'></sub></form><legend id='HMau3'></legend><bdo id='HMau3'><pre id='HMau3'><center id='HMau3'></center></pre></bdo></b><th id='HMau3'></th></span></q></dt></tr></i><div id='HMau3'><tfoot id='HMau3'></tfoot><dl id='HMau3'><fieldset id='HMau3'></fieldset></dl></div>
      <bdo id='HMau3'></bdo><ul id='HMau3'></ul>

  2. <small id='HMau3'></small><noframes id='HMau3'>

    1. <legend id='HMau3'><style id='HMau3'><dir id='HMau3'><q id='HMau3'></q></dir></style></legend>

    2. <tfoot id='HMau3'></tfoot>
    3. 如何使用 Python PIL 将图像保存到特定目录?

      How do I use Python PIL to save an image to a particular directory?(如何使用 Python PIL 将图像保存到特定目录?)
      • <bdo id='Nk1oQ'></bdo><ul id='Nk1oQ'></ul>
      • <i id='Nk1oQ'><tr id='Nk1oQ'><dt id='Nk1oQ'><q id='Nk1oQ'><span id='Nk1oQ'><b id='Nk1oQ'><form id='Nk1oQ'><ins id='Nk1oQ'></ins><ul id='Nk1oQ'></ul><sub id='Nk1oQ'></sub></form><legend id='Nk1oQ'></legend><bdo id='Nk1oQ'><pre id='Nk1oQ'><center id='Nk1oQ'></center></pre></bdo></b><th id='Nk1oQ'></th></span></q></dt></tr></i><div id='Nk1oQ'><tfoot id='Nk1oQ'></tfoot><dl id='Nk1oQ'><fieldset id='Nk1oQ'></fieldset></dl></div>

            <small id='Nk1oQ'></small><noframes id='Nk1oQ'>

              <tbody id='Nk1oQ'></tbody>
            <legend id='Nk1oQ'><style id='Nk1oQ'><dir id='Nk1oQ'><q id='Nk1oQ'></q></dir></style></legend>
              • <tfoot id='Nk1oQ'></tfoot>

                本文介绍了如何使用 Python PIL 将图像保存到特定目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                例如,我想处理一些图像,然后将其保存到特定目录.如何保存到我所在目录以外的特定目录?我知道这将保存到我所在的目录:

                For example I want to manipulate some image and then save it to a particular directory. How do I save to a specific directory other than the one I am in? I understand that this will save to the directory I am in:

                from PIL import Image
                """ Some Code """
                img.save("sample.png", "")
                

                如何保存到其他目录?

                推荐答案

                试试这个

                img.save('/absolute/path/to/myphoto.jpg', 'JPEG')
                

                这篇关于如何使用 Python PIL 将图像保存到特定目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Running .jl file from R or Python(从 R 或 Python 运行 .jl 文件)
                Running Julia .jl file in python(在 python 中运行 Julia .jl 文件)
                Using PIP in a Azure WebApp(在 Azure WebApp 中使用 PIP)
                How to run python3.7 based flask web api on azure(如何在 azure 上运行基于 python3.7 的烧瓶 web api)
                Azure Python Web App Internal Server Error(Azure Python Web 应用程序内部服务器错误)
                Run python dlib library on azure app service(在 azure app 服务上运行 python dlib 库)

                  <tbody id='LmxNi'></tbody>
                <tfoot id='LmxNi'></tfoot>

                1. <small id='LmxNi'></small><noframes id='LmxNi'>

                  • <bdo id='LmxNi'></bdo><ul id='LmxNi'></ul>

                    <i id='LmxNi'><tr id='LmxNi'><dt id='LmxNi'><q id='LmxNi'><span id='LmxNi'><b id='LmxNi'><form id='LmxNi'><ins id='LmxNi'></ins><ul id='LmxNi'></ul><sub id='LmxNi'></sub></form><legend id='LmxNi'></legend><bdo id='LmxNi'><pre id='LmxNi'><center id='LmxNi'></center></pre></bdo></b><th id='LmxNi'></th></span></q></dt></tr></i><div id='LmxNi'><tfoot id='LmxNi'></tfoot><dl id='LmxNi'><fieldset id='LmxNi'></fieldset></dl></div>
                    <legend id='LmxNi'><style id='LmxNi'><dir id='LmxNi'><q id='LmxNi'></q></dir></style></legend>