Coerce different image resource representations to BufferedImage.
Coerce different image resource representations to BufferedImage.
(as-image x)
Coerce argument to an image.
Coerce argument to an image.
(load-image resource)
Loads an image from resource.
Loads an image from resource.
(parse-extension path)
Parses the image extension from the path.
Parses the image extension from the path.
(sanitize-path path)
Sanitizes a path. Returns the sanitized path, or throws if sanitization is not possible.
Sanitizes a path. Returns the sanitized path, or throws if sanitization is not possible.
(save image path & rest)
Store an image on disk.
Accepts optional keyword arguments.
:quality
- decimal, between 0.0 and 1.0. Defaults to 0.8.
:progressive
- boolean, true
turns progressive saving on, false
turns it off. Defaults to the default value in the ImageIO API -
ImageWriteParam/MODE_COPY_FROM_METADATA
. See
Java docs.
Examples:
(save image "/path/to/new/image.jpg" :quality 1.0) (save image "/path/to/new/image/jpg" :progressive false)
Returns the path to the saved image when saved successfully.
Store an image on disk. Accepts optional keyword arguments. `:quality` - decimal, between 0.0 and 1.0. Defaults to 0.8. `:progressive` - boolean, `true` turns progressive saving on, `false` turns it off. Defaults to the default value in the ImageIO API - `ImageWriteParam/MODE_COPY_FROM_METADATA`. See [Java docs](http://docs.oracle.com/javase/7/docs/api/javax/imageio/ImageWriteParam.html). Examples: (save image "/path/to/new/image.jpg" :quality 1.0) (save image "/path/to/new/image/jpg" :progressive false) Returns the path to the saved image when saved successfully.
(show image)
Display an image in a JFrame
.
Convenience function for viewing an image quickly.
Display an image in a `JFrame`. Convenience function for viewing an image quickly.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close