[squeak-dev] The Inbox: Graphics-nice.286.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Jan 1 21:10:54 UTC 2014


Nicolas Cellier uploaded a new version of Graphics to project The Inbox:
http://source.squeak.org/inbox/Graphics-nice.286.mcz

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

Name: Graphics-nice.286
Author: nice
Time: 1 January 2014, 10:09:42.413 pm
UUID: d213ef78-95dd-4b4b-bcc5-d71e3a2d72f1
Ancestors: Graphics-nice.285

Fix up PNGReadWriter standard palette after Color 10->8 bits rgb component change.

=============== Diff against Graphics-nice.285 ===============

Item was changed:
  ----- Method: PNGReadWriter class>>initialize (in category 'as yet unclassified') -----
  initialize
  	"
  	PNGReadWriter initialize
  	"
  
  	BPP := {	#(1 2 4 8 16).
  			#(0 0 0 0 0).
  			#(0 0 0 24 48).
  			#(1 2 4 8 0).
  			#(0 0 0 16 32).
  			#(0 0 0 0 0).
  			#(0 0 0 32 64).
  			#(0 0 0 0 0) }.
  
  	BlockHeight := #(8 8 4 4 2 2 1).
  	BlockWidth := #(8 4 4 2 2 1 1).
  
  	StandardColors := Color indexedColors collect:[:aColor|
  		Color 
+ 			r: (aColor red * 255) rounded / 255
+ 			g: (aColor green * 255) rounded / 255
+ 			b: (aColor blue * 255) rounded / 255.
- 			r: (aColor red * 255) truncated / 255
- 			g: (aColor green * 255) truncated / 255
- 			b: (aColor blue * 255) truncated / 255.
  	].
  
  	StandardSwizzleMaps := Array new: 4.
  	#(1 2 4) do:[:i| StandardSwizzleMaps at: i put: (self computeSwizzleMapForDepth: i)].!



More information about the Squeak-dev mailing list