ImageEditor.st
changeset 3346 15a3fc3d13d9
parent 3344 18268a21cb60
child 3349 b8f50ae35c6f
equal deleted inserted replaced
3345:681833029ed5 3346:15a3fc3d13d9
   184         add: (Color redByte: 127 greenByte: 127 blueByte:   0);
   184         add: (Color redByte: 127 greenByte: 127 blueByte:   0);
   185         add: (Color redByte: 127 greenByte:   0 blueByte: 127);
   185         add: (Color redByte: 127 greenByte:   0 blueByte: 127);
   186         add: (Color redByte: 127 greenByte: 127 blueByte: 127);
   186         add: (Color redByte: 127 greenByte: 127 blueByte: 127);
   187         add: (Color redByte: 170 greenByte: 170 blueByte: 170).
   187         add: (Color redByte: 170 greenByte: 170 blueByte: 170).
   188 
   188 
   189     0 to: 5 do:
   189     0 to: 5 do: [:r|                                                    
   190     [:r|                                                    
   190         0 to: 5 do: [:g|
   191         0 to: 5 do:         
   191             0 to: 5 do: [:b|
   192         [:g|
       
   193             0 to: 5 do:                             
       
   194             [:b|
       
   195                 colorMap add: (Color redByte: (r*255//5) ceiling greenByte: (g*255//5) ceiling blueByte: (b*255//5) ceiling)
   192                 colorMap add: (Color redByte: (r*255//5) ceiling greenByte: (g*255//5) ceiling blueByte: (b*255//5) ceiling)
   196             ]
   193             ]
   197         ]
   194         ]
   198     ].
   195     ].
   199 
   196 
   200     1 to: 25 do:
   197     1 to: 25 do: [:g|                             
   201     [:g|                             
       
   202         colorMap add: (Color redByte: (g*255//26) ceiling greenByte: (g*255//26) ceiling blueByte: (g*255//26) ceiling)
   198         colorMap add: (Color redByte: (g*255//26) ceiling greenByte: (g*255//26) ceiling blueByte: (g*255//26) ceiling)
   203     ].
   199     ].
   204 
   200 
   205     ^ Dictionary new
   201     ^ Dictionary new
   206         at: #depth32 put:(FixedPalette redShift:16 redMask:16rFF greenShift:8 greenMask:16rFF blueShift:0 blueMask:16rFF);
   202         at: #depth32 put:(FixedPalette redShift:16 redMask:16rFF greenShift:8 greenMask:16rFF blueShift:0 blueMask:16rFF);