OleFileIO | index /Library/Python/2.7/site-packages/PIL/OleFileIO.py |
# THIS IS WORK IN PROGRESS
#
# The Python Imaging Library
# $Id$
#
# stuff to deal with OLE2 Structured Storage files. this module is
# used by PIL to read Image Composer and FlashPix files, but can also
# be used to read other files of this type.
#
# History:
# 1997-01-20 fl Created
# 1997-01-22 fl Fixed 64-bit portability quirk
# 2003-09-09 fl Fixed typo in OleFileIO.loadfat (noted by Daniel Haertle)
# 2004-02-29 fl Changed long hex constants to signed integers
#
# Notes:
# FIXME: sort out sign problem (eliminate long hex constants)
# FIXME: change filename to use "a/b/c" instead of ["a", "b", "c"]
# FIXME: provide a glob mechanism function (using fnmatchcase)
#
# Literature:
#
# "FlashPix Format Specification, Appendix A", Kodak and Microsoft,
# September 1996.
#
# Quotes:
#
# "If this document and functionality of the Software conflict,
# the actual functionality of the Software represents the correct
# functionality" -- Microsoft, in the OLE format specification
#
# Copyright (c) Secret Labs AB 1997.
# Copyright (c) Fredrik Lundh 1997.
#
# See the README file for information on usage and redistribution.
#
Modules | ||||||
|
Classes | ||||||||||
|
Functions | ||
|
Data | ||
MAGIC = '\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1' VT = {0: 'VT_EMPTY', 1: 'VT_NULL', 2: 'VT_I2', 3: 'VT_I4', 4: 'VT_R4', 5: 'VT_R8', 6: 'VT_CY', 7: 'VT_DATE', 8: 'VT_BSTR', 9: 'VT_DISPATCH', ...} VT_BLOB = 65 VT_BLOB_OBJECT = 70 VT_BOOL = 11 VT_BSTR = 8 VT_CARRAY = 28 VT_CF = 71 VT_CLSID = 72 VT_CY = 6 VT_DATE = 7 VT_DECIMAL = 14 VT_DISPATCH = 9 VT_EMPTY = 0 VT_ERROR = 10 VT_FILETIME = 64 VT_HRESULT = 25 VT_I1 = 16 VT_I2 = 2 VT_I4 = 3 VT_I8 = 20 VT_INT = 22 VT_LPSTR = 30 VT_LPWSTR = 31 VT_NULL = 1 VT_PTR = 26 VT_R4 = 4 VT_R8 = 5 VT_SAFEARRAY = 27 VT_STORAGE = 67 VT_STORED_OBJECT = 69 VT_STREAM = 66 VT_STREAMED_OBJECT = 68 VT_UI1 = 17 VT_UI2 = 18 VT_UI4 = 19 VT_UI8 = 21 VT_UINT = 23 VT_UNKNOWN = 13 VT_USERDEFINED = 29 VT_VARIANT = 12 VT_VECTOR = 4096 VT_VOID = 24 WORD_CLSID = '00020900-0000-0000-C000-000000000046' k = 'VT_UNKNOWN' v = 13 |