             [clj-time.local :as tl]
 
             [image-resizer.core :refer :all]
+            [image-resizer.format :as format]
+            [image-resizer.pad :as pad]
             )
   )
 

            ext (image-resizer.fs/extension full-path)]
        ;;(println "EXT:" (clojure.string/lower-case ext))
        (when (#{"png" "jpg" "jpeg" "gif"} (clojure.string/lower-case ext))
          (doseq [w ws
                  :let [full-path-spec (str full-path w)]]
            (-> file-src
                ;;(image-resizer.core/resize-to-width w)
                
                ;;((image-resizer.resize/resize-width-fn w image-resizer.scale-methods/ultra-quality))
                ((image-resizer.resize/force-resize-fn w w image-resizer.scale-methods/ultra-quality))
                
                (javax.imageio.ImageIO/write ext (new java.io.File full-path-spec))))))

      dir-filename)))

(defn save-file [tempfile dir filename]
  (save-file-o tempfile dir filename {}))

(def files-root-directory (promise))


(defn image-file_as_w_png [buffered-file file-src w]
  (let [resized-file (new java.io.File (str (.getPath file-src) "_as_" w ".png"))]
    (javax.imageio.ImageIO/write buffered-file "png" resized-file)
    (.getAbsolutePath resized-file)))

(defn save-file-o [tempfile dir filename {:keys [ws] :or {ws []}}]
  (let [dir-filename (str dir "/" filename)
        full-path (str (if (realized? files-root-directory) @files-root-directory
