Depth8Image.st
changeset 5331 b82f0ada86b3
parent 4889 91227e415992
child 5371 8825c8866613
equal deleted inserted replaced
5330:eb0bfc409b60 5331:b82f0ada86b3
   287         ('Depth8Image [info]: allocating ' , usedColors size printString , ' colors ...') infoPrintCR.
   287         ('Depth8Image [info]: allocating ' , usedColors size printString , ' colors ...') infoPrintCR.
   288     ].
   288     ].
   289 
   289 
   290     "sort by usage"
   290     "sort by usage"
   291     usageCounts := bytes usageCounts.
   291     usageCounts := bytes usageCounts.
   292     usageCounts := usedColors asArray collect:[:clr | usageCounts at:(clr + 1)].
   292     usageCounts := usedColors collect:[:clr | usageCounts at:(clr + 1)] as:Array.
   293     usageCounts sort:[:a :b | a > b] with:usedColors.
   293     usageCounts sort:[:a :b | a > b] with:usedColors.
   294 
   294 
   295     "allocate the colors (in order of usage count)"
   295     "allocate the colors (in order of usage count)"
   296 
   296 
   297     imgMap := Array new:maxIndex.
   297     imgMap := Array new:maxIndex.
  2445 ! !
  2445 ! !
  2446 
  2446 
  2447 !Depth8Image class methodsFor:'documentation'!
  2447 !Depth8Image class methodsFor:'documentation'!
  2448 
  2448 
  2449 version
  2449 version
  2450     ^ '$Header: /cvs/stx/stx/libview/Depth8Image.st,v 1.112 2008-01-27 16:23:39 cg Exp $'
  2450     ^ '$Header: /cvs/stx/stx/libview/Depth8Image.st,v 1.113 2009-08-23 09:25:42 cg Exp $'
  2451 ! !
  2451 ! !