equal
deleted
inserted
replaced
5279 oldImage := self image. |
5279 oldImage := self image. |
5280 |
5280 |
5281 prevMode := colorMapMode value. |
5281 prevMode := colorMapMode value. |
5282 |
5282 |
5283 newColorMap := self class listOfColorMaps at:aMode. |
5283 newColorMap := self class listOfColorMaps at:aMode. |
5284 aMode == #depth32 ifTrue:[ |
5284 (aMode == #depth32 or:[aMode == #masked32]) ifTrue:[ |
5285 depth := 32. |
5285 depth := 32. |
5286 ] ifFalse:[ |
5286 ] ifFalse:[ |
5287 depth := (newColorMap size log:2) asInteger. |
5287 (aMode == #depth24 or:[aMode == #masked24]) ifTrue:[ |
|
5288 depth := 24. |
|
5289 ] ifFalse:[ |
|
5290 depth := (newColorMap size log:2) asInteger. |
|
5291 ]. |
5288 ]. |
5292 ]. |
5289 |
5293 |
5290 useNearest := false. |
5294 useNearest := false. |
5291 depth == 1 ifTrue:[ |
5295 depth == 1 ifTrue:[ |
5292 quest := 'Keep colormap (or use standard B&W)' |
5296 quest := 'Keep colormap (or use standard B&W)' |
5389 |
5393 |
5390 imageEditView makeUndo. |
5394 imageEditView makeUndo. |
5391 |
5395 |
5392 newImage := Image newForDepth:depth. |
5396 newImage := Image newForDepth:depth. |
5393 newImage depth:depth. |
5397 newImage depth:depth. |
|
5398 depth >= 16 ifTrue:[ |
|
5399 depth == 32 ifTrue:[ |
|
5400 newImage colorMap:nil. |
|
5401 newImage samplesPerPixel:4. |
|
5402 newImage photometric:#rgba. |
|
5403 ] ifFalse:[ |
|
5404 newImage colorMap:nil. |
|
5405 newImage samplesPerPixel:3. |
|
5406 newImage photometric:#rgb. |
|
5407 ]. |
|
5408 ]. |
5394 "/ newImage photometric:oldImage photometric. |
5409 "/ newImage photometric:oldImage photometric. |
5395 |
5410 |
5396 oldFileName := oldImage fileName. |
5411 oldFileName := oldImage fileName. |
5397 |
5412 |
5398 Image imageErrorSignal handle:[:ex| |
5413 Image imageErrorSignal handle:[:ex| |