author | Stefan Vogel <sv@exept.de> |
Mon, 13 Mar 2017 09:54:33 +0100 | |
changeset 3941 | dd9237d3a727 |
parent 1848 | 864ca2cd4e71 |
child 3855 | 1db7742d33ad |
child 3998 | f38061cec746 |
permissions | -rw-r--r-- |
37 | 1 |
" |
2 |
COPYRIGHT (c) 1994 by Claus Gittinger |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
1577 | 13 |
"{ Package: 'stx:libview2' }" |
14 |
||
37 | 15 |
ImageReader subclass:#TargaReader |
1738 | 16 |
instanceVariableNames:'orientation bytesPerRow bytesPerPixel' |
210 | 17 |
classVariableNames:'' |
18 |
poolDictionaries:'' |
|
1745
4fa0fad2a463
code cleanup (colorMap handling)
Claus Gittinger <cg@exept.de>
parents:
1738
diff
changeset
|
19 |
category:'Graphics-Images-Readers' |
37 | 20 |
! |
21 |
||
22 |
!TargaReader class methodsFor:'documentation'! |
|
23 |
||
24 |
copyright |
|
25 |
" |
|
26 |
COPYRIGHT (c) 1994 by Claus Gittinger |
|
27 |
All Rights Reserved |
|
28 |
||
29 |
This software is furnished under a license and may be used |
|
30 |
only in accordance with the terms of that license and with the |
|
31 |
inclusion of the above copyright notice. This software may not |
|
32 |
be provided or otherwise made available to, or used by, any |
|
33 |
other person. No title to or ownership of the software is |
|
34 |
hereby transferred. |
|
35 |
" |
|
36 |
! |
|
37 |
||
38 |
documentation |
|
39 |
" |
|
40 |
this class provides methods for loading targa-file (tga) images. |
|
556 | 41 |
|
37 | 42 |
Limitations: |
556 | 43 |
not fully tested (I only had a few targa files to check things) |
44 |
only supports 8,24 and 32 bits/pixel formats; alpha channel is ignored |
|
210 | 45 |
Image saving not supported |
37 | 46 |
|
47 |
I had two tga files to test this code with - it may not work with |
|
556 | 48 |
other targa files (it certainly does not work with 1/16 bit images). |
299 | 49 |
|
37 | 50 |
Suggestions: adapt & use the pbmplus library here. |
210 | 51 |
|
52 |
[See also:] |
|
234 | 53 |
Image Form Icon |
210 | 54 |
BlitImageReader FaceReader GIFReader JPEGReader PBMReader PCXReader |
55 |
ST80FormReader SunRasterReader TIFFReader WindowsIconReader |
|
56 |
XBMReader XPMReader XWDReader |
|
37 | 57 |
" |
1738 | 58 |
! |
59 |
||
60 |
format |
|
61 |
" |
|
62 |
Shorts etc. are lsb. |
|
63 |
||
64 |
offset: |
|
65 |
||
66 |
1 lenID byte |
|
67 |
2 hasColorMap byte |
|
68 |
3 imageType byte |
|
69 |
1 MapRGB |
|
70 |
2 RawRGB |
|
71 |
3 RawMono |
|
72 |
9 MapEnCode |
|
73 |
10 RawEnCode |
|
74 |
4, 5 cmapOffset short |
|
75 |
6, 7 cmapLength short |
|
76 |
8 cmapEntrySize short |
|
77 |
9,10 xOrg short |
|
78 |
11,12 yOrg short |
|
79 |
||
80 |
13,14 width |
|
81 |
15,16 height |
|
82 |
17 depth |
|
83 |
18 flags |
|
84 |
0000 xxxx attribute-bits-per-pixel |
|
85 |
0000 0001 greysc |
|
86 |
0000 0010 colour |
|
87 |
0000 0011 mapped |
|
88 |
0000 0100 rleEncoded |
|
89 |
0000 1000 interlaced |
|
90 |
00xx 0000 origin (0 -> lower-left / 1 -> l-r / 2 -> u-l / 3 -> u-r) |
|
91 |
xx00 0000 interleave (0 -> none / 1 -> odd/even / 2 ->4-fould / 3 reserved) |
|
92 |
||
93 |
19.. len lenID-bytes |
|
94 |
.. colorMap cmapLength*3 bytes iff hasColorMap ~~ 0 |
|
95 |
" |
|
37 | 96 |
! ! |
97 |
||
98 |
!TargaReader class methodsFor:'initialization'! |
|
99 |
||
100 |
initialize |
|
210 | 101 |
"tell Image-class, that a new fileReader is present |
398 | 102 |
for the '.tga' extension." |
210 | 103 |
|
647 | 104 |
MIMETypes defineImageType:'image/x-targa' suffix:'tga' reader:self. |
37 | 105 |
|
630 | 106 |
"Modified: 27.6.1997 / 18:39:43 / cg" |
37 | 107 |
! ! |
108 |
||
109 |
!TargaReader class methodsFor:'testing'! |
|
110 |
||
111 |
isValidImageFile:aFileName |
|
112 |
"return true, if aFileName contains a targa-file image" |
|
113 |
||
1577 | 114 |
|aStream w h depth flags imageType ok| |
115 |
||
116 |
ok := true. |
|
37 | 117 |
|
43 | 118 |
aStream := self streamReadingFile:aFileName. |
119 |
aStream isNil ifTrue:[^ false]. |
|
120 |
aStream binary. |
|
1577 | 121 |
|
122 |
aStream next. "lenID" |
|
123 |
aStream next. "hasColorMap" |
|
124 |
imageType := aStream next. |
|
125 |
aStream skip:2. "cmapOffset" |
|
126 |
aStream skip:2. "cmapLength" |
|
127 |
aStream next. "cmapEntrySize" |
|
128 |
aStream skip:2. "xOrg" |
|
129 |
aStream skip:2. "yOrg" |
|
37 | 130 |
|
43 | 131 |
w := aStream nextShortMSB:false. |
132 |
h := aStream nextShortMSB:false. |
|
37 | 133 |
|
43 | 134 |
depth := aStream next. |
135 |
flags := aStream next. |
|
37 | 136 |
|
1577 | 137 |
"/ MapRGB == 1 |
138 |
"/ RawRGB == 2 |
|
139 |
"/ RawMono == 3 |
|
140 |
"/ MapEnCode == 9 |
|
141 |
"/ RawEnCode == 10 |
|
142 |
||
143 |
(#(1 2 3 9 10) includes:imageType) ifFalse:[ |
|
144 |
"/ 'TargaReader [warning]: unsupported imageType: ' errorPrint. imageType errorPrintCR. |
|
145 |
ok := false |
|
146 |
] ifTrue:[ |
|
147 |
(#(8 "16" 24 32) includes:depth) ifFalse:[ |
|
148 |
ok := false |
|
149 |
]. |
|
37 | 150 |
]. |
43 | 151 |
aStream close. |
1577 | 152 |
^ ok |
37 | 153 |
|
154 |
" |
|
155 |
TargaReader isValidImageFile:'bitmaps/test.tga' |
|
156 |
TargaReader isValidImageFile:'bitmaps/garfield.gif' |
|
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
157 |
" |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
158 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
159 |
"Modified: 21.4.1997 / 20:46:52 / cg" |
37 | 160 |
! ! |
161 |
||
1848 | 162 |
!TargaReader methodsFor:'private-reading'! |
37 | 163 |
|
1738 | 164 |
handleImageOrientation |
165 |
|rowIdx startIdx endIdx t| |
|
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
166 |
|
1738 | 167 |
orientation == #topLeft ifTrue:[ |
168 |
^ self. |
|
37 | 169 |
]. |
170 |
||
1738 | 171 |
orientation == #topRight ifTrue:[ |
172 |
"/ flip horizontal |
|
173 |
rowIdx := 1. |
|
174 |
1 to:height do:[:row | |
|
175 |
startIdx := rowIdx. |
|
176 |
endIdx := rowIdx + bytesPerRow - bytesPerPixel. |
|
177 |
1 to:width//2 do:[:x | |
|
178 |
0 to:bytesPerPixel-1 do:[:c | |
|
179 |
t := data at:startIdx+c. |
|
180 |
data at:startIdx+c put:(data at:endIdx+c). |
|
181 |
data at:endIdx+c put:t. |
|
182 |
]. |
|
183 |
startIdx := startIdx + bytesPerPixel. |
|
184 |
endIdx := endIdx - bytesPerPixel. |
|
1065
32a68620ddab
care for EOF while reading colorMap.
Claus Gittinger <cg@exept.de>
parents:
918
diff
changeset
|
185 |
]. |
1738 | 186 |
rowIdx := rowIdx + width. |
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
187 |
]. |
1738 | 188 |
^ self. |
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
189 |
]. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
190 |
|
1738 | 191 |
orientation == #bottomLeft ifTrue:[ |
192 |
"/ flip vertical |
|
193 |
startIdx := 1. |
|
194 |
endIdx := 1 + ((height - 1) * bytesPerRow). |
|
195 |
t := ByteArray new:bytesPerRow. |
|
196 |
1 to:height//2 do:[:row | |
|
197 |
t replaceFrom:1 to:bytesPerRow with:data startingAt:startIdx. |
|
198 |
data replaceFrom:startIdx to:startIdx+bytesPerRow-1 with:data startingAt:endIdx. |
|
199 |
data replaceFrom:endIdx to:endIdx+bytesPerRow-1 with:t startingAt:1. |
|
200 |
startIdx := startIdx + bytesPerRow. |
|
201 |
endIdx := endIdx - bytesPerRow |
|
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
202 |
]. |
1738 | 203 |
^ self. |
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
204 |
]. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
205 |
|
1738 | 206 |
'TargaReader [warning]: unsupported orientation: ' errorPrint. orientation errorPrintCR. |
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
207 |
! |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
208 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
209 |
read24 |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
210 |
"read a 24 bit/pixel targa-image" |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
211 |
|
1738 | 212 |
|totalBytes| |
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
213 |
|
1738 | 214 |
totalBytes := width * height * 3. |
215 |
data := ByteArray new:totalBytes. |
|
216 |
inStream nextBytes:totalBytes into:data. |
|
299 | 217 |
|
37 | 218 |
" |
299 | 219 |
mhmh - pixel-byte order is blue-green-red |
220 |
swap blue & red bytes |
|
37 | 221 |
" |
1738 | 222 |
self class swap:totalBytes bytesFromRGB_to_BGR_in:data. |
37 | 223 |
|
224 |
photometric := #rgb. |
|
225 |
samplesPerPixel := 3. |
|
226 |
bitsPerSample := #(8 8 8). |
|
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
227 |
! |
37 | 228 |
|
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
229 |
read24RLE |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
230 |
"read an 8 bit/pixel rle encoded targa-image" |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
231 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
232 |
|total count dstIndex code n r g b| |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
233 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
234 |
data := ByteArray new:((total := width * height * 3)). |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
235 |
count := 0. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
236 |
dstIndex := 1. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
237 |
[count < total] whileTrue:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
238 |
code := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
239 |
n := (code bitAnd:16r7F) + 1. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
240 |
(code bitAnd:16r80) ~~ 0 ifTrue:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
241 |
b := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
242 |
g := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
243 |
r := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
244 |
n timesRepeat:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
245 |
data at:dstIndex put:r. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
246 |
data at:dstIndex+1 put:g. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
247 |
data at:dstIndex+2 put:b. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
248 |
dstIndex := dstIndex + 3 |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
249 |
]. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
250 |
] ifFalse:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
251 |
n timesRepeat:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
252 |
b := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
253 |
g := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
254 |
r := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
255 |
data at:dstIndex put:r. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
256 |
data at:dstIndex+1 put:g. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
257 |
data at:dstIndex+2 put:b. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
258 |
dstIndex := dstIndex + 3 |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
259 |
] |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
260 |
]. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
261 |
count := count + (n * 3). |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
262 |
]. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
263 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
264 |
photometric := #rgb. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
265 |
samplesPerPixel := 3. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
266 |
bitsPerSample := #(8 8 8). |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
267 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
268 |
"Modified: 21.4.1997 / 20:21:12 / cg" |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
269 |
"Created: 21.4.1997 / 20:43:23 / cg" |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
270 |
! |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
271 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
272 |
read32 |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
273 |
"read a 32 bit/pixel targa-image; skip alpha channel (for now)" |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
274 |
|
1738 | 275 |
|totalBytes remainingBytes dstIndex a r g b| |
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
276 |
|
1738 | 277 |
totalBytes := width * height * 3. |
278 |
data := ByteArray new:totalBytes. |
|
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
279 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
280 |
dstIndex := 1. |
1738 | 281 |
remainingBytes := totalBytes. |
282 |
[remainingBytes > 0] whileTrue:[ |
|
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
283 |
b := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
284 |
g := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
285 |
r := inStream nextByte. |
1738 | 286 |
a := inStream nextByte. "/ alpha - skipped |
287 |
data at:dstIndex put:r. |
|
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
288 |
data at:dstIndex+1 put:g. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
289 |
data at:dstIndex+2 put:b. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
290 |
dstIndex := dstIndex + 3. |
1738 | 291 |
remainingBytes := remainingBytes - 3. |
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
292 |
]. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
293 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
294 |
photometric := #rgb. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
295 |
samplesPerPixel := 3. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
296 |
bitsPerSample := #(8 8 8). |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
297 |
|
1738 | 298 |
" |
299 |
TargaReader fromFile:'/phys/exept//unsaved1/pd_stuff/graphic/3d_engines/crystal_space/CS/plugins/video/canvas/sdl/img/move.tga' |
|
300 |
TargaReader fromFile:'/phys/exept/unsaved2/smalltalk/Squeak/croquet/Croquet/Content/Cisco/2520/Textures/2520caseback.tga' |
|
301 |
TargaReader fromFile:'/phys/exept/unsaved2/smalltalk/Squeak/croquet/Croquet/Content/Cisco/2520/Textures/2520dimm1front.tga' |
|
302 |
" |
|
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
303 |
! |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
304 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
305 |
read32RLE |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
306 |
"read a 32 bit/pixel rle encoded targa-image; skip alpha channel (for now)" |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
307 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
308 |
|total count dstIndex code n a r g b| |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
309 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
310 |
data := ByteArray new:((total := width * height * 3)). |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
311 |
count := 0. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
312 |
dstIndex := 1. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
313 |
[count < total] whileTrue:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
314 |
code := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
315 |
n := (code bitAnd:16r7F) + 1. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
316 |
(code bitAnd:16r80) ~~ 0 ifTrue:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
317 |
b := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
318 |
g := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
319 |
r := inStream nextByte. |
1738 | 320 |
a := inStream nextByte. "/ alpha - skipped |
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
321 |
n timesRepeat:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
322 |
data at:dstIndex put:r. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
323 |
data at:dstIndex+1 put:g. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
324 |
data at:dstIndex+2 put:b. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
325 |
dstIndex := dstIndex + 3 |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
326 |
]. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
327 |
] ifFalse:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
328 |
n timesRepeat:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
329 |
b := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
330 |
g := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
331 |
r := inStream nextByte. |
1738 | 332 |
a := inStream nextByte. "/ alpha - skipped |
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
333 |
data at:dstIndex put:r. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
334 |
data at:dstIndex+1 put:g. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
335 |
data at:dstIndex+2 put:b. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
336 |
dstIndex := dstIndex + 3 |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
337 |
] |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
338 |
]. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
339 |
count := count + (n * 3). |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
340 |
]. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
341 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
342 |
photometric := #rgb. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
343 |
samplesPerPixel := 3. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
344 |
bitsPerSample := #(8 8 8). |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
345 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
346 |
"Created: 21.4.1997 / 20:43:54 / cg" |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
347 |
"Modified: 21.4.1997 / 20:45:49 / cg" |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
348 |
! |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
349 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
350 |
read8 |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
351 |
"read an 8 bit/pixel targa-image" |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
352 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
353 |
data := ByteArray new:(width * height). |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
354 |
inStream nextBytes:(data size) into:data. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
355 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
356 |
colorMap isNil ifTrue:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
357 |
photometric := #blackIs0. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
358 |
] ifFalse:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
359 |
photometric := #palette. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
360 |
]. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
361 |
samplesPerPixel := 1. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
362 |
bitsPerSample := #(8). |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
363 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
364 |
"Created: 21.4.1997 / 20:12:35 / cg" |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
365 |
"Modified: 21.4.1997 / 20:39:02 / cg" |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
366 |
! |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
367 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
368 |
read8RLE |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
369 |
"read an 8 bit/pixel rle encoded targa-image" |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
370 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
371 |
|total count dstIndex code n byte| |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
372 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
373 |
data := ByteArray new:((total := width * height)). |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
374 |
count := 0. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
375 |
dstIndex := 1. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
376 |
[count < total] whileTrue:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
377 |
code := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
378 |
n := (code bitAnd:16r7F) + 1. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
379 |
(code bitAnd:16r80) ~~ 0 ifTrue:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
380 |
byte := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
381 |
data from:dstIndex to:dstIndex+n-1 put:byte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
382 |
] ifFalse:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
383 |
inStream nextBytes:n into:data startingAt:dstIndex. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
384 |
]. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
385 |
count := count + n. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
386 |
dstIndex := dstIndex + n. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
387 |
]. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
388 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
389 |
photometric := #palette. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
390 |
samplesPerPixel := 1. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
391 |
bitsPerSample := #(8). |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
392 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
393 |
"Created: 21.4.1997 / 20:19:46 / cg" |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
394 |
"Modified: 21.4.1997 / 20:21:12 / cg" |
1738 | 395 |
! |
396 |
||
397 |
readColorMap:cmapLength |
|
398 |
colorMap := Array new:cmapLength. |
|
399 |
1 to:cmapLength do:[:index | |
|
400 |
|r g b| |
|
401 |
||
402 |
b := inStream nextByte. |
|
403 |
g := inStream nextByte. |
|
404 |
r := inStream nextByte. |
|
405 |
(r isNil or:[g isNil or:[b isNil]]) ifTrue:[ |
|
406 |
^ self fileFormatError:('short file - probably not targa format'). |
|
407 |
]. |
|
408 |
colorMap at:index put:(Color redByte:r greenByte:g blueByte:b). |
|
409 |
]. |
|
410 |
^ colorMap |
|
37 | 411 |
! ! |
412 |
||
1848 | 413 |
!TargaReader methodsFor:'reading'! |
414 |
||
415 |
readImage |
|
416 |
"read a targa-image from aFileName. return the receiver (with all |
|
417 |
relevant instance variables set for the image) or nil on error" |
|
418 |
||
419 |
|depth flags lenID hasColorMap imageType |
|
420 |
cmapOffset cmapLength cmapEntrySize xOrg yOrg rle| |
|
421 |
||
422 |
inStream binary. |
|
423 |
||
424 |
lenID := inStream next. |
|
425 |
hasColorMap := inStream next. |
|
426 |
imageType := inStream next. |
|
427 |
cmapOffset := inStream nextShortMSB:false. |
|
428 |
cmapLength := inStream nextShortMSB:false. |
|
429 |
cmapEntrySize := inStream next. |
|
430 |
xOrg := inStream nextShortMSB:false. |
|
431 |
yOrg := inStream nextShortMSB:false. |
|
432 |
||
433 |
width := inStream nextShortMSB:false. |
|
434 |
height := inStream nextShortMSB:false. |
|
435 |
depth := inStream next. |
|
436 |
(#(8 "16" 24 32) includes:depth) ifFalse:[ |
|
437 |
^ self fileFormatError:('unsupported depth: ', depth printString). |
|
438 |
]. |
|
439 |
depth == 32 ifTrue:[ |
|
440 |
'TargaReader [info]: alpha channel ignored' infoPrintCR. |
|
441 |
] ifFalse:[ |
|
442 |
'TargaReader [info]: depth: ' infoPrint. depth infoPrintCR. |
|
443 |
]. |
|
444 |
||
445 |
"/ MapRGB == 1 |
|
446 |
"/ RawRGB == 2 |
|
447 |
"/ RawMono == 3 |
|
448 |
"/ MapEnCode == 9 |
|
449 |
"/ RawEnCode == 10 |
|
450 |
||
451 |
(#(1 2 9 10) includes:imageType) ifFalse:[ |
|
452 |
"/ 'TargaReader [warning]: unsupported imageType: ' errorPrint. imageType errorPrintCR. |
|
453 |
^ self fileFormatError:('unsupported imageType: ', imageType printString). |
|
454 |
]. |
|
455 |
'TargaReader [info]: imageType: ' infoPrint. imageType infoPrintCR. |
|
456 |
||
457 |
self reportDimension. |
|
458 |
||
459 |
"/ flags: |
|
460 |
"/ 0000 xxxx attribute-bits-per-pixel |
|
461 |
"/ 0000 0001 greysc |
|
462 |
"/ 0000 0010 colour |
|
463 |
"/ 0000 0011 mapped |
|
464 |
"/ 0000 0100 rleEncoded |
|
465 |
"/ 0000 1000 interlaced |
|
466 |
"/ 00xx 0000 origin (0 -> lower-left / 1 -> l-r / 2 -> u-l / 3 -> u-r) |
|
467 |
"/ xx00 0000 interleave (0 -> none / 1 -> odd/even / 2 ->4-fould / 3 reserved) |
|
468 |
"/ |
|
469 |
flags := inStream next. |
|
470 |
||
471 |
(flags bitAnd:2r11000000) ~~ 0 ifTrue:[ |
|
472 |
^ self fileFormatError:('unsupported interlace: ' , flags printString). |
|
473 |
]. |
|
474 |
||
475 |
rle := flags bitTest:2r000001000. |
|
476 |
flags := flags bitAnd:2r111110111. |
|
477 |
||
478 |
(flags bitAnd:2r00001111) ~~ 0 ifTrue:[ |
|
479 |
^ self fileFormatError:('unsupported flags: ' , flags printString). |
|
480 |
]. |
|
481 |
||
482 |
(flags bitAnd:2r00110000) == 16r20 ifTrue:[ |
|
483 |
orientation := #topLeft |
|
484 |
] ifFalse:[ |
|
485 |
(flags bitAnd:2r00110000) == 16r30 ifTrue:[ |
|
486 |
orientation := #topRight |
|
487 |
] ifFalse:[ |
|
488 |
(flags bitAnd:2r00110000) == 16r10 ifTrue:[ |
|
489 |
orientation := #bottomRight |
|
490 |
] ifFalse:[ |
|
491 |
(flags bitAnd:2r00110000) == 0 ifTrue:[ |
|
492 |
orientation := #bottomLeft |
|
493 |
] |
|
494 |
] |
|
495 |
] |
|
496 |
]. |
|
497 |
||
498 |
lenID ~~ 0 ifTrue:[ |
|
499 |
inStream skip:lenID |
|
500 |
]. |
|
501 |
||
502 |
hasColorMap ~~ 0 ifTrue:[ |
|
503 |
"/ read the colorMap |
|
504 |
colorMap := self readColorMap:cmapLength. |
|
505 |
'TargaReader [info]: has colorMap' infoPrintCR. |
|
506 |
]. |
|
507 |
||
508 |
depth == 32 ifTrue:[ |
|
509 |
imageType == 2 ifTrue:[ |
|
510 |
"/ rle ifTrue:[self halt:'oops - should not happen']. |
|
511 |
self read32. |
|
512 |
] ifFalse:[ |
|
513 |
"/ rle ifFalse:[self halt:'oops - should not happen']. |
|
514 |
self read32RLE. |
|
515 |
]. |
|
516 |
bytesPerRow := width*3. |
|
517 |
bytesPerPixel := 3. |
|
518 |
]. |
|
519 |
depth == 24 ifTrue:[ |
|
520 |
imageType == 2 ifTrue:[ |
|
521 |
"/ rle ifTrue:[self halt:'oops - should not happen']. |
|
522 |
self read24. |
|
523 |
] ifFalse:[ |
|
524 |
"/ rle ifFalse:[self halt:'oops - should not happen']. |
|
525 |
self read24RLE. |
|
526 |
]. |
|
527 |
bytesPerRow := width*3. |
|
528 |
bytesPerPixel := 3. |
|
529 |
]. |
|
530 |
depth == 8 ifTrue:[ |
|
531 |
imageType == 1 ifTrue:[ |
|
532 |
"/ rle ifTrue:[self halt:'oops - should not happen']. |
|
533 |
self read8. |
|
534 |
] ifFalse:[ |
|
535 |
"/ rle ifFalse:[self halt:'oops - should not happen']. |
|
536 |
self read8RLE |
|
537 |
]. |
|
538 |
bytesPerRow := width. |
|
539 |
bytesPerPixel := 1. |
|
540 |
]. |
|
541 |
||
542 |
self handleImageOrientation. |
|
543 |
||
544 |
" |
|
545 |
TargaReader fromFile:'bitmaps/test.tga' |
|
546 |
" |
|
547 |
||
548 |
"Modified: / 7.9.1998 / 21:12:12 / cg" |
|
549 |
"Modified: / 13.10.1998 / 19:50:48 / ps" |
|
550 |
! ! |
|
551 |
||
210 | 552 |
!TargaReader class methodsFor:'documentation'! |
553 |
||
554 |
version |
|
1848 | 555 |
^ '$Header: /cvs/stx/stx/libview2/TargaReader.st,v 1.25 2003-11-19 15:38:53 cg Exp $' |
210 | 556 |
! ! |
1738 | 557 |
|
37 | 558 |
TargaReader initialize! |