[squeak-dev] The Trunk: Graphics-ct.521.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Jun 10 11:23:18 UTC 2022


Christoph Thiede uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-ct.521.mcz

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

Name: Graphics-ct.521
Author: ct
Time: 10 June 2022, 1:23:10.905533 pm
UUID: aaca5f81-5bee-bf44-b004-60dfdbc1df31
Ancestors: Graphics-mt.520

Minor recategorizations and typo fixes for the GIFReadWriter.

=============== Diff against Graphics-mt.520 ===============

Item was changed:
+ ----- Method: AnimatedGIFReadWriter class>>basicNew (in category 'instance creation') -----
- ----- Method: AnimatedGIFReadWriter class>>basicNew (in category 'as yet unclassified') -----
  basicNew
  	"Notify that the class is being deprecated."
  	self deprecated: 'This class is deprecated. Its functionality can be found in the regular GIFReadWriter class instead.'.
  	^ super basicNew
  	!

Item was changed:
  ImageReadWriter subclass: #GIFReadWriter
  	instanceVariableNames: 'width height bitsPerPixel colorPalette rowByteSize xpos ypos pass interlace transparentIndex localColorTable loopCount offset frames canvasWidth canvasHeight backgroundColorIndex comment'
  	classVariableNames: 'Extension ImageSeparator Terminator'
  	poolDictionaries: ''
  	category: 'Graphics-Files'!
  
+ !GIFReadWriter commentStamp: 'ct 6/10/2022 13:02' prior: 0!
- !GIFReadWriter commentStamp: '' prior: 0!
  I am GIFReadWriter.
  I am a concrete ImageReadWriter.
  
  Updated implementation of a GIF file (byte-level) decoder.
  
+ I implement a Stream-like behavior over a GIF image file, and can both read and write GIF files.
- I implment a Stream-like behavior over a GIF image file, and can both read and write GIF files.
  
  Previously, two classes distinguished between "still" and "animated" GIFs. However, the standard specifies that any GIF can have "frames" and be animated. This reimplementation treats this as normal.
  
  See these links for more detailed information:
   
   https://www.w3.org/Graphics/GIF/spec-gif89a.txt
   https://en.wikipedia.org/wiki/GIF
   http://www.matthewflickinger.com/lab/whatsinagif/bits_and_bytes.asp
  
  For writing GIF files, I take a collection of AnimatedImageFrame objects and write the appropriate headers, Graphics Control Extensions, and everything else needed for writing an animated GIF.
  
  For reading GIF files, I take a binary filestream and set my own `frames` variable to be a collection of AnimatedImageFrames, which themselves contain decoded Forms and instructions for disposal, delay, etc.
  
  NOTE: I make use of the LzwGifDecoder and LzwGifEncoder classes in order to encode/decode individual bitmap data for each image frame of the GIF.
  
  See `GIFReadWriter exampleAnim` for more information.  !

Item was changed:
+ ----- Method: GIFReadWriter class>>formsFromFileNamed: (in category 'image reading/writing') -----
- ----- Method: GIFReadWriter class>>formsFromFileNamed: (in category 'as yet unclassified') -----
  formsFromFileNamed: aFile
  	^ (self on: aFile asDirectoryEntry readStream binary)
  			readHeader;
  			readBody;
  			yourself!

Item was changed:
+ ----- Method: GIFReadWriter class>>formsFromStream: (in category 'image reading/writing') -----
- ----- Method: GIFReadWriter class>>formsFromStream: (in category 'as yet unclassified') -----
  formsFromStream: aBinaryStream
  	^ (self on: aBinaryStream)
  		readHeader;
  		readBody;
  		yourself!



More information about the Squeak-dev mailing list