[squeak-dev] The Trunk: Graphics-mt.300.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Aug 12 08:06:54 UTC 2014

Marcel Taeumel uploaded a new version of Graphics to project The Trunk:

==================== Summary ====================

Name: Graphics-mt.300
Author: mt
Time: 12 August 2014, 10:04:47.352 am
UUID: 6462eee8-e43a-4840-954c-edc02dfcd8ee
Ancestors: Graphics-nice.299

fixed image reading: stream was not correctly reset for each reader/writer test

=============== Diff against Graphics-nice.299 ===============

Item was changed:
  ----- Method: ImageReadWriter class>>formFromStream: (in category 'image reading/writing') -----
  formFromStream: aBinaryStream
  	"Answer a ColorForm stored on the given stream.  closes the stream"
  	| reader readerClass form  |
  	readerClass := self withAllSubclasses
+ 		detect: [:subclass |
+ 			aBinaryStream reset.
+ 			subclass understandsImageFormat: aBinaryStream]
- 		detect: [:subclass | subclass understandsImageFormat: aBinaryStream]
  		ifNone: [
  			aBinaryStream close.
  			^self error: 'image format not recognized'].
  	aBinaryStream reset.
  	reader := readerClass new on: aBinaryStream.
  	Cursor read showWhile: [
  		form := reader nextImage.
  		reader close].
  	^ form

More information about the Squeak-dev mailing list