推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
billion
V2EX  ›  Python

Python 如何将 windows 剪贴板中的图片保存到电脑上?

  •  
  •   billion ·
    kingname · Mar 6, 2016 · 4121 views
    This topic created in 3801 days ago, the information mentioned may be changed or developed.

    不使用包括 PIL 在内的第三方图形库的情况下,请问该如何做?

    我现在使用 win32clipboard 的 GetClipboardData(win32con.CF_DIB)可以得到一个图片的字符串,这个字符串应该就是图片的内容了。但是如果以.bmp 格式保存到硬盘上后,没有办法打开。

    3 replies    2016-03-07 10:57:17 +08:00
    zhuangzhuang1988
        1
    zhuangzhuang1988  
       Mar 7, 2016
    bmp 不仅仅只是后缀名, 也是有格式的..
    billion
        2
    billion  
    OP
       Mar 7, 2016
    @zhuangzhuang1988 所以?
    zhuangzhuang1988
        3
    zhuangzhuang1988  
       Mar 7, 2016
    @billion 你要自己构建 bmp 的头才可能看得到..
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   841 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 20:32 · PVG 04:32 · LAX 13:32 · JFK 16:32
    ♥ Do have faith in what you're doing.