Skip to content

Commit

Permalink
- remove not needed comment
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusDenker committed Feb 18, 2021
1 parent 3ce4b82 commit b4111cf
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Graphics-Files/Form.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,17 @@ Form class >> fromBase64String: aBase64EncodedString [

{ #category : #'*Graphics-Files' }
Form class >> fromBinaryStream: aBinaryStream [

"Read a Form or ColorForm from given file, using the first byte of the file to guess its format. Currently handles: GIF, uncompressed BMP, and new DisplayObject writeOn: formats, JPEG, and PCX. Return nil if the file could not be read or was of an unrecognized format."

| firstByte |
firstByte := aBinaryStream peek.
firstByte = 1 ifTrue: [
"old ST80 format" ^ self error: 'old ST80 format not supported' ].
firstByte = 2 ifTrue: [
^ self new readFrom: aBinaryStream].
firstByte = 1 ifTrue: [ ^ self error: 'old ST80 format not supported' ].
firstByte = 2 ifTrue: [ ^ self new readFrom: aBinaryStream ].

"Try for JPG, GIF, or PCX..."
"Note: The following call closes the stream."
^ ImageReadWriter formFromStream: aBinaryStream

]

{ #category : #'*Graphics-Files' }
Expand Down

0 comments on commit b4111cf

Please sign in to comment.