ImageReader.st
changeset 618 5d5277119897
parent 611 e0442439a3c6
child 665 843bf13683f5
--- a/ImageReader.st	Thu Apr 25 19:31:18 1996 +0200
+++ b/ImageReader.st	Fri Apr 26 16:57:23 1996 +0200
@@ -989,25 +989,28 @@
     (i.e. TIFFReader, GIFReader etc.)
 
     ImageReaders are created temporary to read an image from a stream.
-    They read the stream and collect all relevant information internally.
+    Normally, they are not directly used - instead, the image class is
+    asked to read some file, and return an instance for it:
+        Image fromFile:<someFileName>
+    The Image class will guess the images format and forward the task to
+    some concrete ImageReaderClass.
+    If that class finds, that the files format is incorrect, other readers
+    are tried until some finds the files format acceptable.
+
+    Image readers read the stream and collect all relevant information internally.
     Once done with reading, the actual image object is created and
     data filled in from the imageReaders collected info.
 
-    See implementation of fromStream: in concrete subclasses.
+    See the implementation of #fromStream: in concrete subclasses.
     The public interfaces are:
          <ConcreteReaderClass> fromFile:aFilename
     or:
          <ConcreteReaderClass> fromStream:aStream
 
-    However, usually this is done indirectly through
-        Image fromFile:aFileName
-    which tries to find an appropriate readerClass by the fileNames
-    extension (i.e. .tiff, .gif etc.) and/or by asking the readers
-    if they know about the format of the file (see #isValidImageFile:).
-
     If you add a new reader, dont forget to add the method #isValidImageFile:
-    if this reader supports reading image files.
-    And/or if it supports writing files, dont forget to add #canRepresent:.
+    which should return true, if this reader supports reading a given file.
+    If your new reader class supports writing files, dont forget to add 
+    #canRepresent:anImage and return true from this method.
 
     [See also:]
         Image Icon Form
@@ -1482,5 +1485,5 @@
 !ImageReader class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/ImageReader.st,v 1.28 1996-04-25 16:23:21 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/ImageReader.st,v 1.29 1996-04-26 14:57:23 cg Exp $'
 ! !