ImageEditor.st
changeset 3370 c88532134a2b
parent 3367 033c21371bea
child 3374 2cb3e68941a8
equal deleted inserted replaced
3369:31415966af41 3370:c88532134a2b
  5311             depth := 32. 
  5311             depth := 32. 
  5312         ] ifFalse:[
  5312         ] ifFalse:[
  5313             (aMode == #depth24 or:[aMode == #masked24]) ifTrue:[
  5313             (aMode == #depth24 or:[aMode == #masked24]) ifTrue:[
  5314                 depth := 24. 
  5314                 depth := 24. 
  5315             ] ifFalse:[
  5315             ] ifFalse:[
  5316                 depth := (newColorMap size log:2) asInteger. 
  5316                 (aMode == #depth16 or:[aMode == #masked16]) ifTrue:[
       
  5317                     depth := 16. 
       
  5318                 ] ifFalse:[
       
  5319                     depth := (newColorMap size log:2) asInteger. 
       
  5320                 ].
  5317             ].
  5321             ].
  5318         ].
  5322         ].
  5319 
  5323 
  5320         useNearest := false.
  5324         useNearest := false.
  5321         depth == 1 ifTrue:[
  5325         depth == 1 ifTrue:[
  5475                 image := newImage
  5479                 image := newImage
  5476             ].
  5480             ].
  5477         ] do:[ 
  5481         ] do:[ 
  5478             image := newImage 
  5482             image := newImage 
  5479                         fromImage:oldImage 
  5483                         fromImage:oldImage 
  5480                         photometric:(newColorMap notNil
  5484                         photometric:((newColorMap notNil and:[newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]])
  5481                                         ifTrue:[#palette]
  5485                                         ifTrue:[#palette]
  5482                                         ifFalse:[nil]).
  5486                                         ifFalse:[nil]).
  5483                          "/ -- nope; keep the newly determined photometric. photometric:oldImage photometric.
  5487                          "/ -- nope; keep the newly determined photometric. photometric:oldImage photometric.
  5484         ].
  5488         ].
  5485 
  5489