ImageEditor.st
changeset 1499 0c57ab09156b
parent 1496 15253ecf71c8
child 1502 f5baa791b8cb
equal deleted inserted replaced
1498:817cce99fc96 1499:0c57ab09156b
  1013 
  1013 
  1014     ^ 
  1014     ^ 
  1015      #(#Menu
  1015      #(#Menu
  1016         #(
  1016         #(
  1017          #(#MenuItem
  1017          #(#MenuItem
  1018             #label: 'About'
       
  1019             #translateLabel: true
       
  1020             #activeHelpKey: #about
       
  1021             #labelImage: #(#ResourceRetriever nil #menuIcon)
       
  1022             #submenuChannel: #menuAbout
       
  1023           )
       
  1024          #(#MenuItem
       
  1025             #label: '&File'
  1018             #label: '&File'
  1026             #translateLabel: true
  1019             #translateLabel: true
  1027             #activeHelpKey: #file
  1020             #activeHelpKey: #file
  1028             #shortcutKeyCharacter: #Cmdf
  1021             #shortcutKeyCharacter: #Cmdf
  1029             #submenu: 
  1022             #submenu: 
  2264 
  2257 
  2265 addColorToColormap
  2258 addColorToColormap
  2266     |depth img cMap newColorMap newImage oldCListSize newMode|
  2259     |depth img cMap newColorMap newImage oldCListSize newMode|
  2267 
  2260 
  2268     img := self image.
  2261     img := self image.
       
  2262     img isNil ifTrue:[
       
  2263         self warn:'No Image.'.
       
  2264         ^ self
       
  2265     ].
       
  2266 
  2269     depth := img depth.
  2267     depth := img depth.
  2270     cMap := img colorMap.
  2268     cMap := img colorMap.
  2271     cMap isNil ifTrue:[
  2269     cMap isNil ifTrue:[
  2272         self warn:'Image has no colormap\change colorMap mode first.' withCRs.
  2270         self warn:'Image has no colormap.\Change colorMap mode first.' withCRs.
  2273         ^ self
  2271         ^ self
  2274     ].
  2272     ].
  2275 
  2273 
  2276     ((depth == 1)
  2274     ((depth == 1)
  2277     or:[cMap size == (1 bitShift:depth)]) ifTrue:[
  2275     or:[cMap size == (1 bitShift:depth)]) ifTrue:[