ImageEditor.st
changeset 990 4303f0064410
parent 986 4361ba4dbbdc
child 996 9423ae277168
equal deleted inserted replaced
989:180731831d8b 990:4303f0064410
  2381 !
  2381 !
  2382 
  2382 
  2383 grabScreenImage
  2383 grabScreenImage
  2384     "let user choose an area and grab that are for editing"
  2384     "let user choose an area and grab that are for editing"
  2385 
  2385 
  2386     |image d8image img|
  2386     Processor 
  2387 
  2387         addTimedBlock:[
  2388     image := Image fromUser.
  2388             |image d8image img|
  2389 
  2389 
  2390     image depth > 8 ifTrue:[
  2390             image := Image fromUser.
  2391         Object errorSignal handle:[:ex |
  2391 
  2392             ex signal == Object haltSignal ifTrue:[ex reject].
  2392             image depth > 8 ifTrue:[
  2393             ex signal == Signal noHandlerSignal ifTrue:[ex reject].
  2393                 Object errorSignal handle:[:ex |
  2394 
  2394                     ex signal == Object haltSignal ifTrue:[ex reject].
  2395             self warn:'Could not convert to depth8 image (too many colors)'.
  2395                     ex signal == Signal noHandlerSignal ifTrue:[ex reject].
  2396             d8image := nil.
  2396 
  2397         ] do:[
  2397                     self warn:'Could not convert to depth8 image (too many colors)'.
  2398             d8image := Depth8Image new.
  2398                     d8image := nil.
  2399             d8image fromImage:image.
  2399                 ] do:[
  2400         ].
  2400                     d8image := Depth8Image new.
  2401         d8image notNil ifTrue:[
  2401                     d8image fromImage:image.
  2402             image := d8image
  2402                 ].
  2403         ]
  2403                 d8image notNil ifTrue:[
  2404     ].
  2404                     image := d8image
  2405     (imageEditView image:image) notNil ifTrue:[
  2405                 ]
  2406         self listOfColors contents:(image colorMap).
  2406             ].
  2407         self findColorMapMode.
  2407             (imageEditView image:image) notNil ifTrue:[
  2408         self updateLabelsAndHistory.
  2408                 self listOfColors contents:(image colorMap).
  2409     ]
  2409                 self findColorMapMode.
       
  2410                 self updateLabelsAndHistory.
       
  2411             ]
       
  2412                       ] 
       
  2413         afterSeconds:1
  2410 
  2414 
  2411     "Created: / 29.7.1998 / 21:24:42 / cg"
  2415     "Created: / 29.7.1998 / 21:24:42 / cg"
  2412     "Modified: / 31.7.1998 / 01:14:33 / cg"
  2416     "Modified: / 10.9.1998 / 16:01:23 / cg"
  2413 ! !
  2417 ! !
  2414 
  2418 
  2415 !ImageEditor methodsFor:'user actions - saving'!
  2419 !ImageEditor methodsFor:'user actions - saving'!
  2416 
  2420 
  2417 doPrint
  2421 doPrint