Previous | Next

Lisp conditionals


(if (= imageType GRAY)
    (do-greyscale-stuff)   ;; if grayscale
    (do-color-stuff)       ;; else
)

(if (or (= imageMode RGB)
        (= imageMode INDEXED))
    (do-color-stuff)
    (do-greyscale-stuff)
)




Image credit: ste3ve on Flickr / Wikimedia commons (Statue of Yoda at the Lucas studio at the Presidio).