 (s/def ::optional-int (s/or :none nil? :some int?))
 
 (defn resize-image
-  "Resizes the image array to (width, height)"
+  "Resizes the image array to (width, height)
+   `input`: `NDArray` - source image in NDArray
+   `w`: int - Width of resized image
+   `h`: int - Height of resized image
+   `interpolation`: Interpolation method. Default is INTER_LINEAR
+   `ouput`: nil or `NDArray`
+   returns: `NDArray`
+
+   Ex:
+     (resize-image nd-img 300 300)
+     (resize-image nd-img 28 28 {:output nd})"
   ([input w h {:keys [interpolation output]
                :or {interpolation nil output nil}
                :as opts}]

   (apply-border input top bottom left right {})))

(defn fixed-crop
  "Return a fixed crop of the image"
  [input x0 y0 w h]
  (util/validate! ::ndarray input "Invalid input array")
  (util/validate! ::int x0 "Invalid starting x coordinate")

  (s/and ::ndarray ::all-bytes ::rgb-array))

(defn to-image
  "Convert a NDArray image in RGB format to a real image.
   `input`: `NDArray` - Source image in NDArray
   returns: `BufferedImage`"
  [input]
  (util/validate! ::to-image-ndarray input "Invalid input array")
  (Image/toImage input))
