ImageEditor.st
changeset 3355 47dfcea38127
parent 3349 b8f50ae35c6f
child 3356 10e247f059f1
equal deleted inserted replaced
3354:05ab9a73a9a6 3355:47dfcea38127
  5309         or:[depth > oldImage depth
  5309         or:[depth > oldImage depth
  5310         or:[self confirm:(resources string:quest)]]) ifTrue:[
  5310         or:[self confirm:(resources string:quest)]]) ifTrue:[
  5311             (newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[
  5311             (newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[
  5312 
  5312 
  5313                 "/ keep the colormap
  5313                 "/ keep the colormap
  5314                 newColorMap atAllPut:Color black.
  5314                 "/ newColorMap atAllPut:Color black.
  5315                 depth > oldImage depth ifTrue:[
  5315                 depth > oldImage depth ifTrue:[
  5316                     "/ easy - simply copy the part
  5316                     "/ easy - simply copy the part
  5317                     numColors := 1 bitShift:oldImage depth.
  5317                     numColors := 1 bitShift:oldImage depth.
  5318                     0 to:numColors-1 do:[:pixel |
  5318                     0 to:numColors-1 do:[:pixel |
  5319                         newColorMap at:(pixel+1) put:(oldImage colorFromValue:pixel)
  5319                         newColorMap at:(pixel+1) put:(oldImage colorFromValue:pixel)
  5498         (imageEditView image: image) notNil ifTrue:[
  5498         (imageEditView image: image) notNil ifTrue:[
  5499             self fetchImageData.
  5499             self fetchImageData.
  5500         ]
  5500         ]
  5501     ]
  5501     ]
  5502 
  5502 
  5503     "Modified: / 20-07-2007 / 09:18:59 / cg"
  5503     "Modified: / 21-11-2016 / 16:34:03 / cg"
  5504 !
  5504 !
  5505 
  5505 
  5506 colorize
  5506 colorize
  5507     "interactive Hue editing"
  5507     "interactive Hue editing"
  5508 
  5508