r10534: remote warnings, add units capability to make-output-format
[cl-photo.git] / cameras.lisp
index d914d0bad6eb4f123f6022f218bb5afe86f78e09..7eb8b6700bbb96fac819e61f19c3541cf5b2e9bd 100644 (file)
 
 (eval-when (:compile-toplevel :load-toplevel :execute)
   (defun make-output-format (w h &key (units :inches))
-    (let ((name (format nil "~Dx~Din" w h)))
+    (let ((name (format nil "~Dx~D~A" w h
+                       (ecase units
+                         (:inches "in")
+                         (:mm "mm")
+                         (:cm "cm")
+                         (:m "m")
+                         (:feet "ft")))))
       (list :format (kmrcl:ensure-keyword name)
-            :output (cons (inches->mm w) (inches->mm h))
+            :output (cons (length->mm w units) (length->mm h units))
             :name name
             :nicks (list (kmrcl:ensure-keyword (format nil "~Dx~D" w h)))))))
 
     (:format :d2hs :make "Nikon" :pixels (2464 . 1632) :imager (23.3 . 15.5) :name "D2Hs")
     (:format :d2x :make "Nikon" :pixels (4288 . 2848) :imager (23.7 . 15.6) :name "D2X")
 
+    (:format :cp5900 :make "Nikon" :pixels (2592 . 1944) :imager (7.18 . 5.32) :name "Coolpix 5900")
+    (:format :cp7900 :make "Nikon" :pixels (3072 . 2304) :imager (7.18 . 5.32) :name "Coolpix 7900")
+    (:format :cp8800 :make "Nikon" :pixels (3264 . 2448) :imager (8.8 . 6.6) :name "Coolpix 8800")
+
     (:format :*ist-d :make "Pentax" :pixels (3008 . 2008) :imager (36 . 24)
      :name "*ist D")
     (:format :*ist-ds :make "Pentax" :pixels (3008 . 2008) :imager (36 . 24)
     (:format :sd10 :make "Sigma" :pixels (2268 . 1512) :imager (20.7 . 13.8)
      :name "SD10")
 
+    (:format :1/1.8in :imager (7.18 . 5.32) :name "1/1.8\"")
+    (:format :dx :imager (24 . 16) :name "DX")
     (:format :35mm :imager (36 . 24) :name "35mm")
     
     (:format :6x4.5cm :imager (60 . 45) :name "6x4.5cm" :nicks (:\645))