ImageEditor.st
changeset 1544 1048b548abfa
parent 1542 76c2549d878f
child 1545 4f8b08f745eb
equal deleted inserted replaced
1543:09c4ed98434d 1544:1048b548abfa
  1017              #(#MenuItem
  1017              #(#MenuItem
  1018                 #label: 'Add Color'
  1018                 #label: 'Add Color'
  1019                 #translateLabel: true
  1019                 #translateLabel: true
  1020                 #value: #addColorToColormap
  1020                 #value: #addColorToColormap
  1021             )
  1021             )
       
  1022              #(#MenuItem
       
  1023                 #label: '-'
       
  1024             )
       
  1025              #(#MenuItem
       
  1026                 #label: 'Inspect Color'
       
  1027                 #translateLabel: true
       
  1028                 #value: #inspectColor
       
  1029             )
  1022 "/             #(#MenuItem
  1030 "/             #(#MenuItem
  1023 "/                #label: 'Make Brighter'
  1031 "/                #label: 'Make Brighter'
  1024 "/                #translateLabel: true
  1032 "/                #translateLabel: true
  1025 "/                #value: #makeSelectedColorBrighter
  1033 "/                #value: #makeSelectedColorBrighter
  1026 "/            )
  1034 "/            )
  2729         self findColorMapMode.
  2737         self findColorMapMode.
  2730         self updateLabelsAndHistory.
  2738         self updateLabelsAndHistory.
  2731     ]
  2739     ]
  2732 !
  2740 !
  2733 
  2741 
       
  2742 inspectColor
       
  2743     | img clrIndex|
       
  2744 
       
  2745     img := self image.
       
  2746     img isNil ifTrue:[
       
  2747         self warn:'No Image.'.
       
  2748         ^ self
       
  2749     ].
       
  2750     clrIndex := self selectionOfColor value.
       
  2751     (img colorFromValue:clrIndex-1) inspect
       
  2752 !
       
  2753 
  2734 makeGrayScale
  2754 makeGrayScale
  2735     |anyChange img|
  2755     |anyChange img|
  2736 
  2756 
  2737     self withExecuteCursorDo:[
  2757     self withExecuteCursorDo:[
  2738         anyChange := imageEditView makeGrayScale.
  2758         anyChange := imageEditView makeGrayScale.