~edwin-grubbs/python-imaging/trunk

« back to all changes in this revision

Viewing changes to PIL/SunImagePlugin.py

  • Committer: effbot
  • Date: 2006-03-01 19:11:48 UTC
  • Revision ID: svn-v4:be285980-f00d-0410-a9fe-d4747b46ecd0:pil:18
Load Imaging-1.1.3 into pil.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#
2
2
# The Python Imaging Library.
3
 
# $Id$
 
3
# $Id: //modules/pil/PIL/SunImagePlugin.py#3 $
4
4
#
5
5
# Sun image file handling
6
6
#
7
7
# History:
8
 
# 95-09-10 fl   Created
9
 
# 96-05-28 fl   Fixed 32-bit alignment
10
 
# 98-12-29 fl   Import ImagePalette module
 
8
# 1995-09-10 fl   Created
 
9
# 1996-05-28 fl   Fixed 32-bit alignment
 
10
# 1998-12-29 fl   Import ImagePalette module
 
11
# 2001-12-18 fl   Fixed palette loading (from Jean-Claude Rimbault)
11
12
#
12
 
# Copyright (c) Secret Labs AB 1997-98.
13
 
# Copyright (c) Fredrik Lundh 1995-96.
 
13
# Copyright (c) 1997-2001 by Secret Labs AB
 
14
# Copyright (c) 1995-1996 by Fredrik Lundh
14
15
#
15
16
# See the README file for information on usage and redistribution.
16
17
#
17
18
 
18
19
 
19
 
__version__ = "0.2"
 
20
__version__ = "0.3"
20
21
 
21
22
 
22
23
import string
67
68
            offset = offset + length
68
69
            self.palette = ImagePalette.raw("RGB;L", self.fp.read(length))
69
70
            if self.mode == "L":
70
 
                self.mode = "P"
 
71
                self.mode = rawmode = "P"
71
72
 
72
73
        stride = (((self.size[0] * depth + 7) / 8) + 3) & (~3)
73
74