--- a/JPEGReader.st Sat Jan 08 18:12:56 1994 +0100
+++ b/JPEGReader.st Sat Jan 08 18:16:04 1994 +0100
@@ -17,6 +17,18 @@
category:'Graphics-Support'
!
+JPEGReader comment:'
+
+COPYRIGHT (c) 1993 by Claus Gittinger
+ All Rights Reserved
+
+Reader for JPEG images.
+uses PD djpeg tool to convert JPG image to gif first,
+then read GIF image using GIFReader.
+
+$Header: /cvs/stx/stx/libview2/JPEGReader.st,v 1.3 1994-01-08 17:15:51 claus Exp $
+'!
+
!JPEGReader methodsFor:'reading from file'!
fromFile:aFileName
@@ -33,6 +45,8 @@
OperatingSystem executeCommand:'rm ' , tempFileName.
^ reader
].
+ Transcript showCr:'conversion failed ..'.
+ self warn:'cannot execute jpeg converter: djpeg'.
^ nil
"JPEGReader fromFile:'bitmaps/testimg.jpg'"
--- a/PBMReader.st Sat Jan 08 18:12:56 1994 +0100
+++ b/PBMReader.st Sat Jan 08 18:16:04 1994 +0100
@@ -25,7 +25,7 @@
this class provides methods for loading and saving Portable BitMap-file images
(Jef Poskanzers portable bitmap package)..
-$Header: /cvs/stx/stx/libview2/PBMReader.st,v 1.3 1993-12-11 01:31:47 claus Exp $
+$Header: /cvs/stx/stx/libview2/PBMReader.st,v 1.4 1994-01-08 17:15:55 claus Exp $
written Aug 93 by claus
'!
@@ -81,8 +81,6 @@
save:image onFile:aFileName
"save image as PBM/PGM/PNM file on aFileName"
- |pos1 pos|
-
outStream := FileStream newFileNamed:aFileName.
outStream isNil ifTrue:[
'create error' printNewline.
--- 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.
--- a/STFormRdr.st Sat Jan 08 18:12:56 1994 +0100
+++ b/STFormRdr.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/Attic/STFormRdr.st,v 1.1 1993-12-11 01:38:34 claus Exp $
+$Header: /cvs/stx/stx/libview2/Attic/STFormRdr.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.
--- a/SunRasterReader.st Sat Jan 08 18:12:56 1994 +0100
+++ b/SunRasterReader.st Sat Jan 08 18:16:04 1994 +0100
@@ -24,7 +24,7 @@
this class provides methods for loading Sun Raster file images
-$Header: /cvs/stx/stx/libview2/SunRasterReader.st,v 1.4 1993-12-11 01:33:32 claus Exp $
+$Header: /cvs/stx/stx/libview2/SunRasterReader.st,v 1.5 1994-01-08 17:16:04 claus Exp $
written Summer 91 by claus
'!
@@ -48,7 +48,7 @@
"try sun bitmap image format"
inStream text.
- inStream skip:-2.
+ inStream reset.
(inStream skipToAll: 'idth') isNil ifTrue: [
inStream close.
^ false
--- a/SunReader.st Sat Jan 08 18:12:56 1994 +0100
+++ b/SunReader.st Sat Jan 08 18:16:04 1994 +0100
@@ -24,7 +24,7 @@
this class provides methods for loading Sun Raster file images
-$Header: /cvs/stx/stx/libview2/Attic/SunReader.st,v 1.4 1993-12-11 01:33:32 claus Exp $
+$Header: /cvs/stx/stx/libview2/Attic/SunReader.st,v 1.5 1994-01-08 17:16:04 claus Exp $
written Summer 91 by claus
'!
@@ -48,7 +48,7 @@
"try sun bitmap image format"
inStream text.
- inStream skip:-2.
+ inStream reset.
(inStream skipToAll: 'idth') isNil ifTrue: [
inStream close.
^ false