author | Claus Gittinger <cg@exept.de> |
Tue, 07 Oct 2003 21:52:41 +0200 | |
changeset 1830 | 8b04109affc1 |
parent 1805 | 93f557cbe600 |
child 1846 | d29322944b05 |
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 |
||
1805 | 162 |
!TargaReader methodsFor:'reading'! |
163 |
||
164 |
readImage |
|
165 |
"read a targa-image from aFileName. return the receiver (with all |
|
166 |
relevant instance variables set for the image) or nil on error" |
|
167 |
||
168 |
|depth flags lenID hasColorMap imageType |
|
169 |
cmapOffset cmapLength cmapEntrySize xOrg yOrg rle| |
|
170 |
||
171 |
inStream binary. |
|
172 |
||
173 |
lenID := inStream next. |
|
174 |
hasColorMap := inStream next. |
|
175 |
imageType := inStream next. |
|
176 |
cmapOffset := inStream nextShortMSB:false. |
|
177 |
cmapLength := inStream nextShortMSB:false. |
|
178 |
cmapEntrySize := inStream next. |
|
179 |
xOrg := inStream nextShortMSB:false. |
|
180 |
yOrg := inStream nextShortMSB:false. |
|
181 |
||
182 |
width := inStream nextShortMSB:false. |
|
183 |
height := inStream nextShortMSB:false. |
|
184 |
depth := inStream next. |
|
185 |
(#(8 "16" 24 32) includes:depth) ifFalse:[ |
|
186 |
^ self fileFormatError:('unsupported depth: ', depth printString). |
|
187 |
]. |
|
188 |
depth == 32 ifTrue:[ |
|
189 |
'TargaReader [info]: alpha channel ignored' infoPrintCR. |
|
190 |
] ifFalse:[ |
|
191 |
'TargaReader [info]: depth: ' infoPrint. depth infoPrintCR. |
|
192 |
]. |
|
193 |
||
194 |
"/ MapRGB == 1 |
|
195 |
"/ RawRGB == 2 |
|
196 |
"/ RawMono == 3 |
|
197 |
"/ MapEnCode == 9 |
|
198 |
"/ RawEnCode == 10 |
|
199 |
||
200 |
(#(1 2 9 10) includes:imageType) ifFalse:[ |
|
201 |
"/ 'TargaReader [warning]: unsupported imageType: ' errorPrint. imageType errorPrintCR. |
|
202 |
^ self fileFormatError:('unsupported imageType: ', imageType printString). |
|
203 |
]. |
|
204 |
'TargaReader [info]: imageType: ' infoPrint. imageType infoPrintCR. |
|
205 |
||
206 |
"/ flags: |
|
207 |
"/ 0000 xxxx attribute-bits-per-pixel |
|
208 |
"/ 0000 0001 greysc |
|
209 |
"/ 0000 0010 colour |
|
210 |
"/ 0000 0011 mapped |
|
211 |
"/ 0000 0100 rleEncoded |
|
212 |
"/ 0000 1000 interlaced |
|
213 |
"/ 00xx 0000 origin (0 -> lower-left / 1 -> l-r / 2 -> u-l / 3 -> u-r) |
|
214 |
"/ xx00 0000 interleave (0 -> none / 1 -> odd/even / 2 ->4-fould / 3 reserved) |
|
215 |
"/ |
|
216 |
flags := inStream next. |
|
217 |
||
218 |
(flags bitAnd:2r11000000) ~~ 0 ifTrue:[ |
|
219 |
^ self fileFormatError:('unsupported interlace: ' , flags printString). |
|
220 |
]. |
|
221 |
||
222 |
rle := flags bitTest:2r000001000. |
|
223 |
flags := flags bitAnd:2r111110111. |
|
224 |
||
225 |
(flags bitAnd:2r00001111) ~~ 0 ifTrue:[ |
|
226 |
^ self fileFormatError:('unsupported flags: ' , flags printString). |
|
227 |
]. |
|
228 |
||
229 |
(flags bitAnd:2r00110000) == 16r20 ifTrue:[ |
|
230 |
orientation := #topLeft |
|
231 |
] ifFalse:[ |
|
232 |
(flags bitAnd:2r00110000) == 16r30 ifTrue:[ |
|
233 |
orientation := #topRight |
|
234 |
] ifFalse:[ |
|
235 |
(flags bitAnd:2r00110000) == 16r10 ifTrue:[ |
|
236 |
orientation := #bottomRight |
|
237 |
] ifFalse:[ |
|
238 |
(flags bitAnd:2r00110000) == 0 ifTrue:[ |
|
239 |
orientation := #bottomLeft |
|
240 |
] |
|
241 |
] |
|
242 |
] |
|
243 |
]. |
|
244 |
||
245 |
lenID ~~ 0 ifTrue:[ |
|
246 |
inStream skip:lenID |
|
247 |
]. |
|
248 |
||
249 |
hasColorMap ~~ 0 ifTrue:[ |
|
250 |
"/ read the colorMap |
|
251 |
colorMap := self readColorMap:cmapLength. |
|
252 |
'TargaReader [info]: has colorMap' infoPrintCR. |
|
253 |
]. |
|
254 |
||
255 |
depth == 32 ifTrue:[ |
|
256 |
imageType == 2 ifTrue:[ |
|
257 |
"/ rle ifTrue:[self halt:'oops - should not happen']. |
|
258 |
self read32. |
|
259 |
] ifFalse:[ |
|
260 |
"/ rle ifFalse:[self halt:'oops - should not happen']. |
|
261 |
self read32RLE. |
|
262 |
]. |
|
263 |
bytesPerRow := width*3. |
|
264 |
bytesPerPixel := 3. |
|
265 |
]. |
|
266 |
depth == 24 ifTrue:[ |
|
267 |
imageType == 2 ifTrue:[ |
|
268 |
"/ rle ifTrue:[self halt:'oops - should not happen']. |
|
269 |
self read24. |
|
270 |
] ifFalse:[ |
|
271 |
"/ rle ifFalse:[self halt:'oops - should not happen']. |
|
272 |
self read24RLE. |
|
273 |
]. |
|
274 |
bytesPerRow := width*3. |
|
275 |
bytesPerPixel := 3. |
|
276 |
]. |
|
277 |
depth == 8 ifTrue:[ |
|
278 |
imageType == 1 ifTrue:[ |
|
279 |
"/ rle ifTrue:[self halt:'oops - should not happen']. |
|
280 |
self read8. |
|
281 |
] ifFalse:[ |
|
282 |
"/ rle ifFalse:[self halt:'oops - should not happen']. |
|
283 |
self read8RLE |
|
284 |
]. |
|
285 |
bytesPerRow := width. |
|
286 |
bytesPerPixel := 1. |
|
287 |
]. |
|
288 |
||
289 |
self handleImageOrientation. |
|
290 |
||
291 |
" |
|
292 |
TargaReader fromFile:'bitmaps/test.tga' |
|
293 |
" |
|
294 |
||
295 |
"Modified: / 7.9.1998 / 21:12:12 / cg" |
|
296 |
"Modified: / 13.10.1998 / 19:50:48 / ps" |
|
297 |
! ! |
|
298 |
||
299 |
!TargaReader methodsFor:'reading-private'! |
|
37 | 300 |
|
1738 | 301 |
handleImageOrientation |
302 |
|rowIdx startIdx endIdx t| |
|
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
303 |
|
1738 | 304 |
orientation == #topLeft ifTrue:[ |
305 |
^ self. |
|
37 | 306 |
]. |
307 |
||
1738 | 308 |
orientation == #topRight ifTrue:[ |
309 |
"/ flip horizontal |
|
310 |
rowIdx := 1. |
|
311 |
1 to:height do:[:row | |
|
312 |
startIdx := rowIdx. |
|
313 |
endIdx := rowIdx + bytesPerRow - bytesPerPixel. |
|
314 |
1 to:width//2 do:[:x | |
|
315 |
0 to:bytesPerPixel-1 do:[:c | |
|
316 |
t := data at:startIdx+c. |
|
317 |
data at:startIdx+c put:(data at:endIdx+c). |
|
318 |
data at:endIdx+c put:t. |
|
319 |
]. |
|
320 |
startIdx := startIdx + bytesPerPixel. |
|
321 |
endIdx := endIdx - bytesPerPixel. |
|
1065
32a68620ddab
care for EOF while reading colorMap.
Claus Gittinger <cg@exept.de>
parents:
918
diff
changeset
|
322 |
]. |
1738 | 323 |
rowIdx := rowIdx + width. |
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
324 |
]. |
1738 | 325 |
^ self. |
555
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 |
|
1738 | 328 |
orientation == #bottomLeft ifTrue:[ |
329 |
"/ flip vertical |
|
330 |
startIdx := 1. |
|
331 |
endIdx := 1 + ((height - 1) * bytesPerRow). |
|
332 |
t := ByteArray new:bytesPerRow. |
|
333 |
1 to:height//2 do:[:row | |
|
334 |
t replaceFrom:1 to:bytesPerRow with:data startingAt:startIdx. |
|
335 |
data replaceFrom:startIdx to:startIdx+bytesPerRow-1 with:data startingAt:endIdx. |
|
336 |
data replaceFrom:endIdx to:endIdx+bytesPerRow-1 with:t startingAt:1. |
|
337 |
startIdx := startIdx + bytesPerRow. |
|
338 |
endIdx := endIdx - bytesPerRow |
|
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
339 |
]. |
1738 | 340 |
^ self. |
555
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 |
|
1738 | 343 |
'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
|
344 |
! |
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 |
read24 |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
347 |
"read a 24 bit/pixel targa-image" |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
348 |
|
1738 | 349 |
|totalBytes| |
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
350 |
|
1738 | 351 |
totalBytes := width * height * 3. |
352 |
data := ByteArray new:totalBytes. |
|
353 |
inStream nextBytes:totalBytes into:data. |
|
299 | 354 |
|
37 | 355 |
" |
299 | 356 |
mhmh - pixel-byte order is blue-green-red |
357 |
swap blue & red bytes |
|
37 | 358 |
" |
1738 | 359 |
self class swap:totalBytes bytesFromRGB_to_BGR_in:data. |
37 | 360 |
|
361 |
photometric := #rgb. |
|
362 |
samplesPerPixel := 3. |
|
363 |
bitsPerSample := #(8 8 8). |
|
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
364 |
! |
37 | 365 |
|
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
366 |
read24RLE |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
367 |
"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
|
368 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
369 |
|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
|
370 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
371 |
data := ByteArray new:((total := width * height * 3)). |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
372 |
count := 0. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
373 |
dstIndex := 1. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
374 |
[count < total] whileTrue:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
375 |
code := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
376 |
n := (code bitAnd:16r7F) + 1. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
377 |
(code bitAnd:16r80) ~~ 0 ifTrue:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
378 |
b := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
379 |
g := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
380 |
r := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
381 |
n timesRepeat:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
382 |
data at:dstIndex put:r. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
383 |
data at:dstIndex+1 put:g. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
384 |
data at:dstIndex+2 put:b. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
385 |
dstIndex := dstIndex + 3 |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
386 |
]. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
387 |
] ifFalse:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
388 |
n timesRepeat:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
389 |
b := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
390 |
g := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
391 |
r := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
392 |
data at:dstIndex put:r. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
393 |
data at:dstIndex+1 put:g. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
394 |
data at:dstIndex+2 put:b. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
395 |
dstIndex := dstIndex + 3 |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
396 |
] |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
397 |
]. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
398 |
count := count + (n * 3). |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
399 |
]. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
400 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
401 |
photometric := #rgb. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
402 |
samplesPerPixel := 3. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
403 |
bitsPerSample := #(8 8 8). |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
404 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
405 |
"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
|
406 |
"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
|
407 |
! |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
408 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
409 |
read32 |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
410 |
"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
|
411 |
|
1738 | 412 |
|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
|
413 |
|
1738 | 414 |
totalBytes := width * height * 3. |
415 |
data := ByteArray new:totalBytes. |
|
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
416 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
417 |
dstIndex := 1. |
1738 | 418 |
remainingBytes := totalBytes. |
419 |
[remainingBytes > 0] whileTrue:[ |
|
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
420 |
b := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
421 |
g := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
422 |
r := inStream nextByte. |
1738 | 423 |
a := inStream nextByte. "/ alpha - skipped |
424 |
data at:dstIndex put:r. |
|
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
425 |
data at:dstIndex+1 put:g. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
426 |
data at:dstIndex+2 put:b. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
427 |
dstIndex := dstIndex + 3. |
1738 | 428 |
remainingBytes := remainingBytes - 3. |
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
429 |
]. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
430 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
431 |
photometric := #rgb. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
432 |
samplesPerPixel := 3. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
433 |
bitsPerSample := #(8 8 8). |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
434 |
|
1738 | 435 |
" |
436 |
TargaReader fromFile:'/phys/exept//unsaved1/pd_stuff/graphic/3d_engines/crystal_space/CS/plugins/video/canvas/sdl/img/move.tga' |
|
437 |
TargaReader fromFile:'/phys/exept/unsaved2/smalltalk/Squeak/croquet/Croquet/Content/Cisco/2520/Textures/2520caseback.tga' |
|
438 |
TargaReader fromFile:'/phys/exept/unsaved2/smalltalk/Squeak/croquet/Croquet/Content/Cisco/2520/Textures/2520dimm1front.tga' |
|
439 |
" |
|
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
440 |
! |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
441 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
442 |
read32RLE |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
443 |
"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
|
444 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
445 |
|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
|
446 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
447 |
data := ByteArray new:((total := width * height * 3)). |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
448 |
count := 0. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
449 |
dstIndex := 1. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
450 |
[count < total] whileTrue:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
451 |
code := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
452 |
n := (code bitAnd:16r7F) + 1. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
453 |
(code bitAnd:16r80) ~~ 0 ifTrue:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
454 |
b := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
455 |
g := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
456 |
r := inStream nextByte. |
1738 | 457 |
a := inStream nextByte. "/ alpha - skipped |
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
458 |
n timesRepeat:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
459 |
data at:dstIndex put:r. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
460 |
data at:dstIndex+1 put:g. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
461 |
data at:dstIndex+2 put:b. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
462 |
dstIndex := dstIndex + 3 |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
463 |
]. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
464 |
] ifFalse:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
465 |
n timesRepeat:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
466 |
b := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
467 |
g := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
468 |
r := inStream nextByte. |
1738 | 469 |
a := inStream nextByte. "/ alpha - skipped |
555
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
470 |
data at:dstIndex put:r. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
471 |
data at:dstIndex+1 put:g. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
472 |
data at:dstIndex+2 put:b. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
473 |
dstIndex := dstIndex + 3 |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
474 |
] |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
475 |
]. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
476 |
count := count + (n * 3). |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
477 |
]. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
478 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
479 |
photometric := #rgb. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
480 |
samplesPerPixel := 3. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
481 |
bitsPerSample := #(8 8 8). |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
482 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
483 |
"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
|
484 |
"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
|
485 |
! |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
486 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
487 |
read8 |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
488 |
"read an 8 bit/pixel targa-image" |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
489 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
490 |
data := ByteArray new:(width * height). |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
491 |
inStream nextBytes:(data size) into:data. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
492 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
493 |
colorMap isNil ifTrue:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
494 |
photometric := #blackIs0. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
495 |
] ifFalse:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
496 |
photometric := #palette. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
497 |
]. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
498 |
samplesPerPixel := 1. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
499 |
bitsPerSample := #(8). |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
500 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
501 |
"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
|
502 |
"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
|
503 |
! |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
504 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
505 |
read8RLE |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
506 |
"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
|
507 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
508 |
|total count dstIndex code n byte| |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
509 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
510 |
data := ByteArray new:((total := width * height)). |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
511 |
count := 0. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
512 |
dstIndex := 1. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
513 |
[count < total] whileTrue:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
514 |
code := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
515 |
n := (code bitAnd:16r7F) + 1. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
516 |
(code bitAnd:16r80) ~~ 0 ifTrue:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
517 |
byte := inStream nextByte. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
518 |
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
|
519 |
] ifFalse:[ |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
520 |
inStream nextBytes:n into:data startingAt:dstIndex. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
521 |
]. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
522 |
count := count + n. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
523 |
dstIndex := dstIndex + n. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
524 |
]. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
525 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
526 |
photometric := #palette. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
527 |
samplesPerPixel := 1. |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
528 |
bitsPerSample := #(8). |
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
529 |
|
f51ec2cc4482
support RLE, 8 and 32 bit images
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
530 |
"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
|
531 |
"Modified: 21.4.1997 / 20:21:12 / cg" |
1738 | 532 |
! |
533 |
||
534 |
readColorMap:cmapLength |
|
535 |
colorMap := Array new:cmapLength. |
|
536 |
1 to:cmapLength do:[:index | |
|
537 |
|r g b| |
|
538 |
||
539 |
b := inStream nextByte. |
|
540 |
g := inStream nextByte. |
|
541 |
r := inStream nextByte. |
|
542 |
(r isNil or:[g isNil or:[b isNil]]) ifTrue:[ |
|
543 |
^ self fileFormatError:('short file - probably not targa format'). |
|
544 |
]. |
|
545 |
colorMap at:index put:(Color redByte:r greenByte:g blueByte:b). |
|
546 |
]. |
|
547 |
^ colorMap |
|
37 | 548 |
! ! |
549 |
||
210 | 550 |
!TargaReader class methodsFor:'documentation'! |
551 |
||
552 |
version |
|
1805 | 553 |
^ '$Header: /cvs/stx/stx/libview2/TargaReader.st,v 1.23 2003-09-01 14:47:27 cg Exp $' |
210 | 554 |
! ! |
1738 | 555 |
|
37 | 556 |
TargaReader initialize! |