File: image.py

package info (click to toggle)
python-docxcompose 1.4.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,136 kB
  • sloc: python: 2,338; makefile: 14; xml: 5; sh: 3
file content (12 lines) | stat: -rw-r--r-- 377 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
import os.path


class ImageWrapper(object):
    """Image wrapper for image part creation out of an existing image part."""

    def __init__(self, img_part):
        self.sha1 = img_part.sha1
        self.filename = img_part.filename
        self.ext = os.path.splitext(self.filename)[1][1:]
        self.content_type = img_part.content_type
        self.blob = img_part.blob