Liking cljdoc? Tell your friends :D

think.image.image


*default-image-impl*clj

source

*default-image-type*clj

source

->arrayclj

(->array img)
(->array img rect)
(->array img rect dest-array)

Copy a rect from the image into an array.

Copy a rect from the image into an array.
sourceraw docstring

->buffered-imageclj

(->buffered-image img)
source

allocate-array-for-imageclj

(allocate-array-for-image img)
(allocate-array-for-image img rect)
source

alpha-blend-imageclj

(alpha-blend-image img blend-color)
source

array->clj

(array-> img source-array)
(array-> img rect source-array)

Copy an array of data into a rect in the image.

Copy an array of data into a rect in the image.
sourceraw docstring

array-matches-image?clj

(array-matches-image? img array-data)
(array-matches-image? img rect array-data)
source

as-buffered-imageclj

(as-buffered-image img)
source

bad-bounding-rect?clj

(bad-bounding-rect? bbox width height)
source

bounding-box->bounding-rectclj

(bounding-box->bounding-rect [x-min y-min x-max y-max])
source

bounding-rect->bounding-boxclj

(bounding-rect->bounding-box rect)
source

buffered-image->clj

(buffered-image-> buffered-image)
(buffered-image-> img buffered-image)

Convert a buffered image into a new image. If no implementation image is provided then one is created using the default image implementation.

Convert a buffered image into a new image.  If no implementation image is provided
then one is created using the default image implementation.
sourceraw docstring

clip-extentclj

(clip-extent coord clip-coord clip-coord-width)
source

clip-rectclj

(clip-rect item-rect clip-rect)

clip item rect such that it fits within clip-rect

clip item rect such that it fits within clip-rect
sourceraw docstring

cloneclj

(clone source-image)

Copy the image producing a new image of the same type.

Copy the image producing a new image of the same type.
sourceraw docstring

convertclj

(convert source-img dst-image-type)

Convert a source image to the desired image type. Always returns a new image even in the case where a new image is not required.

Convert a source image to the desired image type.  Always returns a new image even in the
case where a new image is not required.
sourceraw docstring

copy-toclj

(copy-to source-img dest-img)
(copy-to source-img source-rect dest-img dest-x dest-y)

Copy a sub-rect of the source image to a sub-rect of the destination image. This function does not coerce types so the types of the images must match exactly.

Copy a sub-rect of the source image to a sub-rect of the destination image.  This function
does not coerce types so the types of the images must match exactly.
sourceraw docstring

draw-horizontal-lineclj

(draw-horizontal-line pixels width height y-pos start-x end-x color)
source

draw-rectclj

(draw-rect img bbox int-color)

Given an input image, draw a bounding box in the color defined by a packed int color. Return a new image

Given an input image, draw a bounding box in the color
defined by a packed int color.  Return a new image
sourceraw docstring

draw-rectsclj

(draw-rects img rect-seq int-color)
source

draw-vertical-lineclj

(draw-vertical-line pixels width height x-pos start-y end-y color)
source

ensure-buffered-imageclj

(ensure-buffered-image img)

As cheaply as possible, convert to buffered image.

As cheaply as possible, convert to buffered image.
sourceraw docstring

ensure-valid-bounding-rectclj

(ensure-valid-bounding-rect bbox width height)

Ensure this rect contains enough of an image to mean something and make sure it is within the bounds of the image.

Ensure this rect contains enough of an image to mean something
and make sure it is within the bounds of the image.
sourceraw docstring

fillclj

(fill img int-color)
(fill img rect int-color)

Fill a rect of the image with a solid color

Fill a rect of the image with a solid color
sourceraw docstring

fixed-sized-matrixclj

(fixed-sized-matrix source-matrix
                    content-bbox
                    inner-bbox-seq
                    background-color
                    dest-width
                    dest-height
                    &
                    {:keys [widen-ratio ignore-background]})
source

get-aspect-from-width-heightclj

(get-aspect-from-width-height width height)
source

get-height-from-aspect-widthclj

(get-height-from-aspect-width aspect width)

aspect defined as width/height

aspect defined as width/height
sourceraw docstring

get-larger-target-dimsclj

(get-larger-target-dims src-width src-height dest-aspect)

Get the target width,height if you want a new image with the destination aspect ratio by enlarging (no cropping)

Get the target width,height if you want a new image with the
destination aspect ratio by enlarging (no cropping)
sourceraw docstring

get-pixels-outside-bboxclj

(get-pixels-outside-bbox original-img bounding-rect)
source

get-width-from-aspect-heightclj

(get-width-from-aspect-height aspect height)

aspect defined as width/height

aspect defined as width/height
sourceraw docstring

gray-image->bounding-rectclj

(gray-image->bounding-rect img)
source

grayscaleclj

(grayscale img)
source

grayscale-pixelsclj

(grayscale-pixels img)

Return a byte array of grayscale pixels for the image.

Return a byte array of grayscale pixels for the image.
sourceraw docstring

heightclj

(height img)
source

image->mask-imageclj

(image->mask-image img)

Given an image, take pixels that have any non-black color at all and make them a mask.

Given an image, take pixels that have any non-black color at all
and make them a mask.
sourceraw docstring

image-typeclj

(image-type img)

Return one of [:rgba :rgb :gray]

Return one of [:rgba :rgb :gray]
sourceraw docstring

new-imageclj

(new-image new-width new-height)
(new-image img new-width new-height)
(new-image img new-width new-height image-type)

Create a new image potentially using the default image implementation and the default image type.

Create a new image potentially using the default image implementation
and the default image type.
sourceraw docstring

new-image-from-prototypeclj

(new-image-from-prototype prototype)
(new-image-from-prototype prototype image-type)

Create a new image using the height, width, and possibly the image type of the prototype image.

Create a new image using the height, width, and possibly the image type
of the prototype image.
sourceraw docstring

offset-rectclj

(offset-rect rect x y)
source

pad-or-resizeclj

(pad-or-resize img dest-width background-color)
(pad-or-resize img dest-width background-color bounding-rect-seq)

Either pad or resize an image using background color when padding. When resize by a small enough amount, it is better quality-wise to pad. The function also optionally takes a sequence of bounding boxes that pertain to the image and adjusts them so they are in the same relative location on the new image. Returns either the image or a tuple of the image and the resized bounding boxes.

Either pad or resize an image using background color when padding.  When resize by a small enough amount,
it is better quality-wise to pad.  The function also optionally takes a sequence of
bounding boxes that pertain to the image and adjusts them so they are in the same relative location
on the new image.  Returns either the image or a tuple of the image and the resized bounding boxes.
sourceraw docstring

pixel-countclj

(pixel-count img)
source

releaseclj

(release source-img)

Release a given image. Optional operations and systems that require this should use the resource system (thinktopic/resource).

Release a given image.  Optional operations and systems that require this should use the
resource system (thinktopic/resource).
sourceraw docstring

resizeclj

(resize img new-width)
(resize img new-width new-height)

Resize (scale) the image return a new image of the same type.

Resize (scale) the image return a new image of the same type.
sourceraw docstring

same-dimensions?clj

(same-dimensions? img rect)
source

scale-rectclj

(scale-rect rect ratio)
source

set-alpha-maskclj

(set-alpha-mask source-img alpha-bytes)

Given a source image set it's alpha mask to be these mask bytes. Produces a new rgba image.

Given a source image set it's alpha mask to be these mask bytes.  Produces a new rgba image.
sourceraw docstring

shrink-if-same-dimensionsclj

(shrink-if-same-dimensions img bounding-rect)

Shrink the bounding rect if it is the same dimensions as the image.

Shrink the bounding rect if it is the same dimensions as the image.
sourceraw docstring

shrink-rectclj

(shrink-rect source)
source

sub-imageclj

(sub-image img)
(sub-image img rect)

Create a new sub-image from an existing image

Create a new sub-image from an existing image
sourceraw docstring

widen-rectclj

(widen-rect bbox img-width img-height multiplier)
source

widthclj

(width img)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close