home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / GFX / Misc / PWP522.DMS / in.adf / Rexx / Normalize.pwx < prev    next >
Encoding:
Text File  |  1994-10-27  |  1.3 KB  |  77 lines

  1. /* $VER: Normalize.pwx 1.0 (27.1.94)
  2. **
  3. ** Lädt das im Kontaktabzug markierte Bild und
  4. ** normalisiert es.
  5. **
  6. ** Geschrieben von Olaf Barthel
  7. */
  8.  
  9. /* Befehlsergebnisse zugänglich machen. */
  10.  
  11. options results
  12.  
  13. /* Fehler sollten abgefangen werden. */
  14.  
  15. options failat 100
  16.  
  17. /* Wieviele Bilder sind gerade ausgewählt?. */
  18.  
  19. getattr application field numselected
  20.  
  21. /* Es soll nur ein Bild geladen werden. */
  22.  
  23. if result == 1 then do
  24.  
  25.     /* Das Bild wird geöffnet. */
  26.  
  27.     open selected nodisplay
  28.  
  29.     /* Keine Probleme soweit? */
  30.  
  31.     if rc > 0 then do
  32.         if rc ~= 5 then do
  33.             /* Fehlernummer auslesen. */
  34.  
  35.             fault photoworx.lasterror
  36.  
  37.             /* Fehler anzeigen. */
  38.  
  39.             requestnotify result
  40.         end
  41.  
  42.         exit
  43.     end
  44.  
  45.     /* Falls soweit alles in Ordnung ist, sollte als Ergebnis
  46.      * des letzten Befehls der Name des soeben geladenen Bildes
  47.      * zurückgeliefert worden sein.
  48.      */
  49.  
  50.     if (symbol('RESULT') == "VAR") & (result ~= "") then do
  51.  
  52.         /* Projektname merken. */
  53.  
  54.         currentproject = result
  55.  
  56.         /* Normalisierungsfilter anwenden. */
  57.  
  58.         normalize project currentproject
  59.  
  60.         if rc > 0 then do
  61.             if rc ~= 5 then do
  62.                 /* Fehlernummer auslesen. */
  63.  
  64.                 fault photoworx.lasterror
  65.  
  66.                 /* Fehlermeldung anzeigen. */
  67.  
  68.                 requestnotify result
  69.             end
  70.         end
  71.  
  72.         /* Bild anzeigen. */
  73.  
  74.         redisplay project currentproject
  75.     end
  76. end
  77.