PCXReader.st
author Claus Gittinger <cg@exept.de>
Mon, 01 Sep 2003 16:47:57 +0200
changeset 1805 93f557cbe600
parent 1759 f52382e5a9b8
child 1846 d29322944b05
permissions -rw-r--r--
category changes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
27
93da277c5ddd Initial revision
claus
parents:
diff changeset
     1
"
93da277c5ddd Initial revision
claus
parents:
diff changeset
     2
 COPYRIGHT (c) 1994 by Claus Gittinger
93da277c5ddd Initial revision
claus
parents:
diff changeset
     3
	      All Rights Reserved
93da277c5ddd Initial revision
claus
parents:
diff changeset
     4
93da277c5ddd Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
93da277c5ddd Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
93da277c5ddd Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
93da277c5ddd Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
93da277c5ddd Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
93da277c5ddd Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
93da277c5ddd Initial revision
claus
parents:
diff changeset
    11
"
93da277c5ddd Initial revision
claus
parents:
diff changeset
    12
1562
3b444efb61ee bug fix: palette is padded after RLE data.
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
    13
"{ Package: 'stx:libview2' }"
3b444efb61ee bug fix: palette is padded after RLE data.
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
    14
27
93da277c5ddd Initial revision
claus
parents:
diff changeset
    15
ImageReader subclass:#PCXReader
1737
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
    16
	instanceVariableNames:'header buffer nBuffer bufferIndex sourceBytesPerRow'
201
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    17
	classVariableNames:''
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    18
	poolDictionaries:''
1745
4fa0fad2a463 code cleanup (colorMap handling)
Claus Gittinger <cg@exept.de>
parents: 1737
diff changeset
    19
	category:'Graphics-Images-Readers'
27
93da277c5ddd Initial revision
claus
parents:
diff changeset
    20
!
93da277c5ddd Initial revision
claus
parents:
diff changeset
    21
29
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
    22
!PCXReader class methodsFor:'documentation'!
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
    23
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
    24
copyright
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
    25
"
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
    26
 COPYRIGHT (c) 1994 by Claus Gittinger
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
    27
	      All Rights Reserved
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
    28
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
    29
 This software is furnished under a license and may be used
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
    30
 only in accordance with the terms of that license and with the
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
    32
 be provided or otherwise made available to, or used by, any
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
    33
 other person.  No title to or ownership of the software is
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
    34
 hereby transferred.
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
    35
"
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
    36
!
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
    37
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
    38
documentation
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
    39
"
102
claus
parents: 99
diff changeset
    40
    this class provides methods for loading 8-plane PCX bitmap files.
201
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    41
29
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
    42
    Due to not having too many examples for testing, this could fail
201
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    43
    to read some files. 
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    44
    (especially, I have no uncompressed files for testing).
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    45
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    46
    Only 8-bit (i.e. 256 color) PCX images are supported.
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    47
    Image writing is not supported.
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    48
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    49
    [See also:]
531
19c16bd5e0bf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    50
	Image Form Icon
19c16bd5e0bf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    51
	BlitImageReader FaceReader GIFReader JPEGReader PBMReader 
19c16bd5e0bf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    52
	ST80FormReader SunRasterReader TargaReader TIFFReader WindowsIconReader 
19c16bd5e0bf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    53
	XBMReader XPMReader XWDReader 
29
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
    54
"
1737
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
    55
!
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
    56
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
    57
examples
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
    58
"
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
    59
    Image fromFile:'/usr/share/lilo/suse_640x480.pcx'
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
    60
"
29
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
    61
! !
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
    62
43
e85c7d392833 *** empty log message ***
claus
parents: 35
diff changeset
    63
!PCXReader class methodsFor:'initialization'!
e85c7d392833 *** empty log message ***
claus
parents: 35
diff changeset
    64
e85c7d392833 *** empty log message ***
claus
parents: 35
diff changeset
    65
initialize
201
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    66
    "tell Image-class, that a new fileReader is present
398
aef700d15416 new suffix-table
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
    67
     for the '.pcx' extension."
43
e85c7d392833 *** empty log message ***
claus
parents: 35
diff changeset
    68
647
6f26c76aa0c9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
    69
    MIMETypes defineImageType:'image/x-pcx'  suffix:'pcx' reader:self.
201
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    70
630
48657c687a8b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
    71
    "Modified: 27.6.1997 / 18:39:23 / cg"
43
e85c7d392833 *** empty log message ***
claus
parents: 35
diff changeset
    72
! !
e85c7d392833 *** empty log message ***
claus
parents: 35
diff changeset
    73
27
93da277c5ddd Initial revision
claus
parents:
diff changeset
    74
!PCXReader class methodsFor:'testing'!
93da277c5ddd Initial revision
claus
parents:
diff changeset
    75
93da277c5ddd Initial revision
claus
parents:
diff changeset
    76
isValidImageFile:aFilename
93da277c5ddd Initial revision
claus
parents:
diff changeset
    77
    "return true, if aFilename contains a PCX image"
93da277c5ddd Initial revision
claus
parents:
diff changeset
    78
29
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
    79
    |count header inStream|
27
93da277c5ddd Initial revision
claus
parents:
diff changeset
    80
93da277c5ddd Initial revision
claus
parents:
diff changeset
    81
    inStream := self streamReadingFile:aFilename.
93da277c5ddd Initial revision
claus
parents:
diff changeset
    82
    inStream isNil ifTrue:[^ false].
93da277c5ddd Initial revision
claus
parents:
diff changeset
    83
    inStream binary.
93da277c5ddd Initial revision
claus
parents:
diff changeset
    84
93da277c5ddd Initial revision
claus
parents:
diff changeset
    85
    header := ByteArray uninitializedNew:128.
29
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
    86
    count := inStream nextBytes:128 into:header.
27
93da277c5ddd Initial revision
claus
parents:
diff changeset
    87
    inStream close.
93da277c5ddd Initial revision
claus
parents:
diff changeset
    88
29
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
    89
    ((count == 128) and:[self isValidPCXHeader:header]) ifFalse:[
27
93da277c5ddd Initial revision
claus
parents:
diff changeset
    90
	^ false
93da277c5ddd Initial revision
claus
parents:
diff changeset
    91
    ].
93da277c5ddd Initial revision
claus
parents:
diff changeset
    92
    ^ true
102
claus
parents: 99
diff changeset
    93
claus
parents: 99
diff changeset
    94
    "Modified: 17.9.1995 / 17:32:07 / claus"
201
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    95
!
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    96
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    97
isValidPCXHeader:aHeader
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    98
    "return true, if aHeader looks like a PCX image header"
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
    99
530
749f21b7eff4 comment
Claus Gittinger <cg@exept.de>
parents: 499
diff changeset
   100
    "check magic number"
201
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   101
    ((aHeader at:1) ~~ 16r0A) ifTrue:[
531
19c16bd5e0bf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   102
	^ false
201
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   103
    ].
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   104
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   105
    "check version"
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   106
    (#(0 2 3 5) includes:(aHeader at:2)) ifFalse:[
531
19c16bd5e0bf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   107
	^ false
201
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   108
    ].
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   109
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   110
    ^ true
530
749f21b7eff4 comment
Claus Gittinger <cg@exept.de>
parents: 499
diff changeset
   111
749f21b7eff4 comment
Claus Gittinger <cg@exept.de>
parents: 499
diff changeset
   112
    "Modified: 16.4.1997 / 22:24:32 / cg"
27
93da277c5ddd Initial revision
claus
parents:
diff changeset
   113
! !
93da277c5ddd Initial revision
claus
parents:
diff changeset
   114
1805
93f557cbe600 category changes
Claus Gittinger <cg@exept.de>
parents: 1759
diff changeset
   115
!PCXReader methodsFor:'reading'!
93f557cbe600 category changes
Claus Gittinger <cg@exept.de>
parents: 1759
diff changeset
   116
93f557cbe600 category changes
Claus Gittinger <cg@exept.de>
parents: 1759
diff changeset
   117
readImage
93f557cbe600 category changes
Claus Gittinger <cg@exept.de>
parents: 1759
diff changeset
   118
    "read an image in pcx format from inStream"
93f557cbe600 category changes
Claus Gittinger <cg@exept.de>
parents: 1759
diff changeset
   119
93f557cbe600 category changes
Claus Gittinger <cg@exept.de>
parents: 1759
diff changeset
   120
    inStream binary.
93f557cbe600 category changes
Claus Gittinger <cg@exept.de>
parents: 1759
diff changeset
   121
93f557cbe600 category changes
Claus Gittinger <cg@exept.de>
parents: 1759
diff changeset
   122
    header := ByteArray uninitializedNew:128.
93f557cbe600 category changes
Claus Gittinger <cg@exept.de>
parents: 1759
diff changeset
   123
    (inStream nextBytes:128 into:header) == 128 ifFalse:[
93f557cbe600 category changes
Claus Gittinger <cg@exept.de>
parents: 1759
diff changeset
   124
        ^ self fileFormatError:'short file'.
93f557cbe600 category changes
Claus Gittinger <cg@exept.de>
parents: 1759
diff changeset
   125
    ].
93f557cbe600 category changes
Claus Gittinger <cg@exept.de>
parents: 1759
diff changeset
   126
93f557cbe600 category changes
Claus Gittinger <cg@exept.de>
parents: 1759
diff changeset
   127
    (self class isValidPCXHeader:header) ifFalse:[
93f557cbe600 category changes
Claus Gittinger <cg@exept.de>
parents: 1759
diff changeset
   128
        ^ self fileFormatError:'wrong header'.
93f557cbe600 category changes
Claus Gittinger <cg@exept.de>
parents: 1759
diff changeset
   129
    ].
93f557cbe600 category changes
Claus Gittinger <cg@exept.de>
parents: 1759
diff changeset
   130
93f557cbe600 category changes
Claus Gittinger <cg@exept.de>
parents: 1759
diff changeset
   131
    self readRestAfterHeader.
93f557cbe600 category changes
Claus Gittinger <cg@exept.de>
parents: 1759
diff changeset
   132
! !
93f557cbe600 category changes
Claus Gittinger <cg@exept.de>
parents: 1759
diff changeset
   133
93f557cbe600 category changes
Claus Gittinger <cg@exept.de>
parents: 1759
diff changeset
   134
!PCXReader methodsFor:'reading-private'!
27
93da277c5ddd Initial revision
claus
parents:
diff changeset
   135
1737
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   136
extractColorMap16
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   137
    "extract the 16-entry colormap from the header"
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   138
1745
4fa0fad2a463 code cleanup (colorMap handling)
Claus Gittinger <cg@exept.de>
parents: 1737
diff changeset
   139
    |rawMap|
1737
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   140
1745
4fa0fad2a463 code cleanup (colorMap handling)
Claus Gittinger <cg@exept.de>
parents: 1737
diff changeset
   141
    rawMap := header copyFrom:17 to:(17 + (16*3) - 1).
1759
f52382e5a9b8 slowly getting rid of the Colormap class
Claus Gittinger <cg@exept.de>
parents: 1756
diff changeset
   142
    ^ MappedPalette rgbBytesVector:rawMap 
1737
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   143
!
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   144
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   145
nextByteFromBufferOrStream
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   146
    |byte|
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   147
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   148
    nBuffer ~~ 0 ifTrue:[
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   149
        byte := buffer at:bufferIndex.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   150
        bufferIndex := bufferIndex + 1. nBuffer := nBuffer - 1.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   151
    ] ifFalse:[
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   152
        byte := inStream next
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   153
    ].
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   154
    ^ byte
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   155
!
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   156
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   157
readColorMap256
1756
7c4f38c59b2a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1745
diff changeset
   158
    |rawMap mapSize|
1737
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   159
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   160
    rawMap := ByteArray uninitializedNew:(256*3).
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   161
    nBuffer ~~ 0 ifTrue:[
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   162
        mapSize := buffer size - bufferIndex + 1.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   163
        mapSize := mapSize min:(256*3).
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   164
        rawMap replaceFrom:1 to:mapSize with:buffer startingAt:bufferIndex.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   165
        nBuffer < (256*3) ifTrue:[
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   166
            inStream nextBytes:((256*3)-nBuffer) into:rawMap startingAt:nBuffer+1
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   167
        ]
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   168
    ] ifFalse:[
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   169
        inStream nextBytes:(256*3) into:rawMap.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   170
    ].
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   171
1759
f52382e5a9b8 slowly getting rid of the Colormap class
Claus Gittinger <cg@exept.de>
parents: 1756
diff changeset
   172
    ^ MappedPalette rgbBytesVector:rawMap 
1737
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   173
!
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   174
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   175
readCompressedData
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   176
    |bendIndex rowIndex dstIndex endIndex byte nByte value idx2
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   177
     srcIndex|
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   178
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   179
    data := ByteArray uninitializedNew:(height * sourceBytesPerRow).
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   180
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   181
    buffer := ByteArray uninitializedNew:4096.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   182
    bufferIndex := 1.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   183
    bendIndex := 1.
201
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   184
1737
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   185
    rowIndex := 1.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   186
    1 to:height do:[:row |
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   187
        dstIndex := rowIndex.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   188
        endIndex := dstIndex + sourceBytesPerRow.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   189
        [dstIndex < endIndex] whileTrue:[
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   190
            bufferIndex == bendIndex ifTrue:[
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   191
                nBuffer := inStream nextBytes:4096 into:buffer.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   192
                bufferIndex := 1.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   193
                bendIndex := nBuffer + 1.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   194
            ].
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   195
            byte := buffer at:bufferIndex.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   196
            bufferIndex := bufferIndex + 1.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   197
            ((byte bitAnd:2r11000000) ~~ 2r11000000) ifTrue:[
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   198
                data at:dstIndex put:byte.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   199
                dstIndex := dstIndex + 1.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   200
            ] ifFalse:[
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   201
                nByte := byte bitAnd:2r00111111.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   202
                bufferIndex == bendIndex ifTrue:[
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   203
                    nBuffer := inStream nextBytes:4096 into:buffer.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   204
                    bufferIndex := 1.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   205
                    bendIndex := nBuffer + 1.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   206
                ].
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   207
                value := buffer at:bufferIndex.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   208
                bufferIndex := bufferIndex + 1.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   209
                idx2 := ((dstIndex + nByte) min:endIndex) - 1.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   210
                data from:dstIndex to:idx2 put:value.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   211
                dstIndex := dstIndex + nByte.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   212
            ].
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   213
        ].
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   214
        rowIndex := endIndex.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   215
    ].
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   216
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   217
    "/ have to compress - above code reads sourceBytesPerRow
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   218
    "/ (to keep in sync with RLE); but we want width bytesPerRow
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   219
    "/ Can compress in the data-area; leftover pixels are simply ignored
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   220
    "/ by other image processing code
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   221
    "/
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   222
    sourceBytesPerRow ~~ width ifTrue:[
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   223
        dstIndex := width + 1.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   224
        srcIndex := sourceBytesPerRow + 1.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   225
        2 to:height do:[:row |
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   226
            data replaceFrom:dstIndex to:dstIndex+width-1 with:data startingAt:srcIndex.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   227
            dstIndex := dstIndex + width.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   228
            srcIndex := srcIndex + sourceBytesPerRow
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   229
        ]
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   230
    ].
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   231
    nBuffer := endIndex - bufferIndex.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   232
!
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   233
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   234
readRestAfterHeader
201
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   235
    "read an raw image in pcx format from aStream.
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   236
     The header has already been read into the header argument."
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   237
27
93da277c5ddd Initial revision
claus
parents:
diff changeset
   238
    | inDepth version compression nPlanes xmin ymin xmax ymax
1737
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   239
      paletteType 
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   240
      byte        "{Class: SmallInteger }" 
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   241
      nMaxPad|
27
93da277c5ddd Initial revision
claus
parents:
diff changeset
   242
531
19c16bd5e0bf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   243
    "/ typedef struct {                         /*header for PCX bitmap files*/
566
f3cbbba715d9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
   244
    "/    unsigned char       signature;          /*1 PCX file identifier*/
f3cbbba715d9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
   245
    "/    unsigned char       version;            /*2 version compatibility level*/
f3cbbba715d9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
   246
    "/    unsigned char       encoding;           /*3 encoding method*/
f3cbbba715d9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
   247
    "/    unsigned char       bitsperpix;         /*4 bits per pixel, or depth*/
f3cbbba715d9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
   248
    "/    unsigned short      Xleft;              /*5 X position of left edge*/
f3cbbba715d9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
   249
    "/    unsigned short      Ytop;               /*7 Y position of top edge*/
f3cbbba715d9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
   250
    "/    unsigned short      Xright;             /*9 X position of right edge*/
f3cbbba715d9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
   251
    "/    unsigned short      Ybottom;            /*11 Y position of bottom edge*/
f3cbbba715d9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
   252
    "/    unsigned short      Xscreensize;        /*13 X screen res of source image*/
f3cbbba715d9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
   253
    "/    unsigned short      Yscreensize;        /*15 Y screen res of source image*/
f3cbbba715d9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
   254
    "/    unsigned char       PCXpalette[16][3];  /*17 PCX color map*/
f3cbbba715d9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
   255
    "/    unsigned char       reserved1;          /*17+48 should be 0, 1 if std res fax*/
f3cbbba715d9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
   256
    "/    unsigned char       planes;             /*66 bit planes in image*/
f3cbbba715d9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
   257
    "/    unsigned short      linesize;           /*67 byte delta between scanlines */
531
19c16bd5e0bf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   258
    "/    unsigned short      paletteinfo;            /*0 == undef
19c16bd5e0bf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   259
    "/                                                  1 == color
19c16bd5e0bf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   260
    "/                                                  2 == grayscale*/
19c16bd5e0bf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   261
    "/    unsigned char reserved2[58];            /*fill to struct size of 128*/
19c16bd5e0bf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   262
    "/ } PCX_HEADER;
19c16bd5e0bf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   263
27
93da277c5ddd Initial revision
claus
parents:
diff changeset
   264
    version := header at:2.
93da277c5ddd Initial revision
claus
parents:
diff changeset
   265
"/    'version=' print. version printNL.
93da277c5ddd Initial revision
claus
parents:
diff changeset
   266
    compression := header at:3.
93da277c5ddd Initial revision
claus
parents:
diff changeset
   267
"/    'compression=' print. compression printNL.
93da277c5ddd Initial revision
claus
parents:
diff changeset
   268
    (#(0 1) includes:compression) ifFalse:[
812
01d6b05a1276 use common fileFormatError reporter
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
   269
        ^ self fileFormatError:'unknown compression'.
27
93da277c5ddd Initial revision
claus
parents:
diff changeset
   270
    ].
530
749f21b7eff4 comment
Claus Gittinger <cg@exept.de>
parents: 499
diff changeset
   271
27
93da277c5ddd Initial revision
claus
parents:
diff changeset
   272
    inDepth := header at:4.
93da277c5ddd Initial revision
claus
parents:
diff changeset
   273
"/    'depth=' print. inDepth printNL.
93da277c5ddd Initial revision
claus
parents:
diff changeset
   274
    nPlanes := header at:66.
93da277c5ddd Initial revision
claus
parents:
diff changeset
   275
"/    'planes=' print. nPlanes printNL.
1737
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   276
    sourceBytesPerRow := header wordAt:67 MSB:false.
83
claus
parents: 43
diff changeset
   277
"/    'srcBytesPerRow=' print. srcBytesPerRow printNL.
27
93da277c5ddd Initial revision
claus
parents:
diff changeset
   278
    paletteType := header at:69.
93da277c5ddd Initial revision
claus
parents:
diff changeset
   279
93da277c5ddd Initial revision
claus
parents:
diff changeset
   280
    "
93da277c5ddd Initial revision
claus
parents:
diff changeset
   281
     although it would be easy to implement ...
93da277c5ddd Initial revision
claus
parents:
diff changeset
   282
     I have no test pictures for other formats.
93da277c5ddd Initial revision
claus
parents:
diff changeset
   283
     So its not (yet) implemented
93da277c5ddd Initial revision
claus
parents:
diff changeset
   284
    "
93da277c5ddd Initial revision
claus
parents:
diff changeset
   285
    ((inDepth ~~ 8) or:[nPlanes ~~ 1]) ifTrue:[
812
01d6b05a1276 use common fileFormatError reporter
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
   286
"/        'PCXReader: depth: ' errorPrint. inDepth errorPrint. 
01d6b05a1276 use common fileFormatError reporter
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
   287
"/        ' planes:' errorPrint. nPlanes errorPrintNL.
01d6b05a1276 use common fileFormatError reporter
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
   288
        ^ self fileFormatError:'can only handle 1-plane 256 color images'.
27
93da277c5ddd Initial revision
claus
parents:
diff changeset
   289
    ].
93da277c5ddd Initial revision
claus
parents:
diff changeset
   290
83
claus
parents: 43
diff changeset
   291
    xmin := header wordAt:5 MSB:false. 
claus
parents: 43
diff changeset
   292
    ymin := header wordAt:7 MSB:false.
claus
parents: 43
diff changeset
   293
    xmax := header wordAt:9 MSB:false. 
claus
parents: 43
diff changeset
   294
    ymax := header wordAt:11 MSB:false.
27
93da277c5ddd Initial revision
claus
parents:
diff changeset
   295
93da277c5ddd Initial revision
claus
parents:
diff changeset
   296
    width := (xmax - xmin + 1).
93da277c5ddd Initial revision
claus
parents:
diff changeset
   297
    height := (ymax - ymin + 1).
93da277c5ddd Initial revision
claus
parents:
diff changeset
   298
"/    'width=' print. width printNL.
93da277c5ddd Initial revision
claus
parents:
diff changeset
   299
"/    'height=' print. width printNL.
93da277c5ddd Initial revision
claus
parents:
diff changeset
   300
93da277c5ddd Initial revision
claus
parents:
diff changeset
   301
    (version == 2) ifTrue:[
1737
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   302
        colorMap := self extractColorMap16.
27
93da277c5ddd Initial revision
claus
parents:
diff changeset
   303
    ].
93da277c5ddd Initial revision
claus
parents:
diff changeset
   304
29
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
   305
    compression == 1 ifTrue:[
1737
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   306
        self readCompressedData
27
93da277c5ddd Initial revision
claus
parents:
diff changeset
   307
    ] ifFalse:[
1737
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   308
        self readUncompressedData
27
93da277c5ddd Initial revision
claus
parents:
diff changeset
   309
    ].
93da277c5ddd Initial revision
claus
parents:
diff changeset
   310
93da277c5ddd Initial revision
claus
parents:
diff changeset
   311
    (version == 5) ifTrue:[
1562
3b444efb61ee bug fix: palette is padded after RLE data.
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
   312
        "/ RLE data is padded - skip over zeros for the 0C-byte
3b444efb61ee bug fix: palette is padded after RLE data.
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
   313
        nMaxPad := 15.
1737
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   314
        byte := self nextByteFromBufferOrStream.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   315
1562
3b444efb61ee bug fix: palette is padded after RLE data.
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
   316
        [(byte ~~ 16r0C) and:[nMaxPad > 0]] whileTrue:[
1737
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   317
            byte := self nextByteFromBufferOrStream.
561
bb8103acb292 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 531
diff changeset
   318
        ].
1562
3b444efb61ee bug fix: palette is padded after RLE data.
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
   319
        (byte == 16r0C) ifFalse:[
3b444efb61ee bug fix: palette is padded after RLE data.
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
   320
            'PCXREADER: no valid 256-entry palette (got' errorPrint. 
3b444efb61ee bug fix: palette is padded after RLE data.
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
   321
            byte errorPrint. '; expected ' errorPrint. 16rC0 errorPrint. ')' errorPrintCR.
3b444efb61ee bug fix: palette is padded after RLE data.
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
   322
        ].
3b444efb61ee bug fix: palette is padded after RLE data.
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
   323
1737
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   324
        colorMap := self readColorMap256.
27
93da277c5ddd Initial revision
claus
parents:
diff changeset
   325
    ].
93da277c5ddd Initial revision
claus
parents:
diff changeset
   326
93da277c5ddd Initial revision
claus
parents:
diff changeset
   327
    photometric := #palette.
93da277c5ddd Initial revision
claus
parents:
diff changeset
   328
    samplesPerPixel := 1.
93da277c5ddd Initial revision
claus
parents:
diff changeset
   329
    bitsPerSample := #(8).
93da277c5ddd Initial revision
claus
parents:
diff changeset
   330
93da277c5ddd Initial revision
claus
parents:
diff changeset
   331
    "
93da277c5ddd Initial revision
claus
parents:
diff changeset
   332
     |i f|
29
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
   333
     i := Image fromFile:'somefile.pcx'.
e04e1aceff6f *** empty log message ***
claus
parents: 27
diff changeset
   334
     i inspect.
27
93da277c5ddd Initial revision
claus
parents:
diff changeset
   335
    "
499
58852715e10d handle partial colorMap
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
   336
812
01d6b05a1276 use common fileFormatError reporter
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
   337
    "Modified: / 3.2.1998 / 17:59:03 / cg"
1737
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   338
!
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   339
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   340
readUncompressedData
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   341
    |dstIndex|
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   342
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   343
    "
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   344
     actually untested ...
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   345
    "
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   346
    data := ByteArray uninitializedNew:(height * width).
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   347
    sourceBytesPerRow ~~ width ifTrue:[
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   348
        dstIndex := 1.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   349
        1 to:height do:[:row |
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   350
            inStream nextBytes:width into:data startingAt:dstIndex.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   351
            dstIndex := dstIndex + width.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   352
            inStream skip:(sourceBytesPerRow - width).
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   353
        ]
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   354
    ] ifFalse:[
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   355
        inStream nextBytes:(height * width) into:data.
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   356
    ].
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   357
    nBuffer := 0.
27
93da277c5ddd Initial revision
claus
parents:
diff changeset
   358
! !
93da277c5ddd Initial revision
claus
parents:
diff changeset
   359
201
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   360
!PCXReader class methodsFor:'documentation'!
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   361
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   362
version
1805
93f557cbe600 category changes
Claus Gittinger <cg@exept.de>
parents: 1759
diff changeset
   363
    ^ '$Header: /cvs/stx/stx/libview2/PCXReader.st,v 1.31 2003-09-01 14:47:48 cg Exp $'
201
c707ed0db1d0 commentary
Claus Gittinger <cg@exept.de>
parents: 182
diff changeset
   364
! !
1737
a1ed08195ee7 refactorings
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
   365
27
93da277c5ddd Initial revision
claus
parents:
diff changeset
   366
PCXReader initialize!