|
The old version is
formFromStream: aBinaryStream "Answer a ColorForm stored on the given stream. closes the stream" | positionableReadStream reader readerClass form | positionableReadStream := ZnPositionableReadStream on: aBinaryStream. readerClass := self readerClassFromStream: positionableReadStream. reader := readerClass new on: positionableReadStream. form := reader nextImage. aBinaryStream close. ^ form
New version
ImageReadWriter class >> formFromStream: aBinaryStream "Answer a ColorForm stored on the given stream. Closes the stream after usage." "A typical example is
PNGReadWriter formFromStream: 'Sprites.png' asFileReference binaryReadStream
or
PNGReadWriter formFromStream: (File named: 'Sprites.png') readStream"
| positionableReadStream reader readerClass form | positionableReadStream := ZnPositionableReadStream on: aBinaryStream. readerClass := self readerClassFromStream: positionableReadStream. reader := readerClass new on: positionableReadStream. form := reader nextImage. aBinaryStream close. ^ form
|
|
|
Priority: 5 – Fix If Time
|
|
Status: Work Needed
|
|
Assigned to: Everyone
|
|
Milestone: Pharo7.0
|
Go to Case
|
|