--- a/ST80FormReader.st Sat Jan 08 18:12:56 1994 +0100
+++ b/ST80FormReader.st Sat Jan 08 18:16:04 1994 +0100
@@ -24,7 +24,7 @@
this class provides methods for loading and saving st80-bitmap-file images.
-$Header: /cvs/stx/stx/libview2/ST80FormReader.st,v 1.1 1993-12-11 01:38:34 claus Exp $
+$Header: /cvs/stx/stx/libview2/ST80FormReader.st,v 1.2 1994-01-08 17:16:00 claus Exp $
written Nov 93 by claus
'!
@@ -33,8 +33,6 @@
save:image onFile:aFileName
"save image as XBM file on aFileName"
- |reverseBits bits srcIndex rowBytes|
-
outStream := FileStream newFileNamed:aFileName.
outStream isNil ifTrue:[
'create error' printNewline.
@@ -74,7 +72,7 @@
isValidImageFile:aFileName
"return true, if aFileName contains an st80-bitmap-file image"
- |line inStream index1 index2 keyword|
+ |code inStream|
inStream := FileStream readonlyFileNamed:aFileName.
inStream isNil ifTrue:[^ false].
@@ -92,15 +90,7 @@
!ST80FormReader methodsFor:'reading from file'!
fromFile:aFileName
- |code
- offsetX offsetY
- index "{ Class: SmallInteger }"
- dstIndex "{ Class: SmallInteger }"
- bytesPerRow
- lo "{ Class: SmallInteger }"
- hi "{ Class: SmallInteger }"
- val "{ Class: SmallInteger }"
- reverseBits|
+ |nBytes code offsetX offsetY|
inStream := FileStream readonlyFileNamed:aFileName.
inStream isNil ifTrue:[
@@ -122,8 +112,7 @@
nBytes := width + 15 // 16 * 2 * height.
data := ByteArray new:nBytes.
- inStream nextBytes:nBytes.
-
+ inStream nextBytes:nBytes into:data.
inStream close.
photometric := #whiteIs0.