Image procedures

You may also find it useful to visit the list of image procedures by category.

A

(above i1 i2 ... in [description])— Create a new image with images i1 through in placed in a stack, each above the next.

B

(beside/align valignment i1 i2 ... in [description])— Place i1 through in in a row beside one another, aligned as described.

(beside i1 i2 ... in [description])— ;; description : string? Create an image with i1 through in placed beside each other in a row.

C

(circle? img)— Determine if the image is a circle.

(compound-image? val)— Determines if val is a compound image, one build by combining other images (e.g., with overlay, beside, or above).

(crop img left top width height [description])— Crop img with the left edge at left, the top edge at top, and the specified width and height.

(curve source source-angle source-pull target target-angle target-pull color line-width [description])— Create a curve from source to target. The curve leaves source at the specified angle and enters target from the specified angle.

D

(describe-image img)— Get the description of the image.

E

(ellipse-height ell)— Determine the height of an ellipse. For outlined ellipses, this is the height of the inner ellipse.

(ellipse? img)— Determine if an image is an ellipse.

(ellipse-width ell)— Determine the width of an ellipse. For outlined ellipses, this is the width of the inner ellipse.

F

(filled-curve source source-angle source-pull target target-angle target-pull color [description])— Create a “filled” curve from source to target. The curve leaves source at the specified angle and enters target from the specified angle. The filled area is between the curve and the straight line between source and target.

(frame img)— Add a frame around the image (generally for debugging).

H

(hflip img [description])— Flip img horizontally.

(hshift img amt [description])— Shift img horizontally right down by amt. If amt is negative, shifts the image left and cuts off the left edge.

I

(image-color img)— Get the color of this image. Returns false if its a type of image that does not have a natural color.

(image-height img)— Get the height of the image.

(image-map fun img)— Apply a function to each basic image in an image.

(image-subtract img1 img2 [description])— “Subtract” img2 from img1, decreasing the opacity of each pixel in img1 by the opacity of the corresponding pixel in img2. image-subtract does not otherwise affect the colors in img1.

(image-width img)— Get the width of the image.

O

(outlined-circle diameter color [description])— Create an outlined circle with the given diameter and color.

(outlined-ellipse width height color line-width [description])— An ellipse of the specified width and height, outlined with a line of the specified color and width.

(outlined-equilateral-triangle width height color line-width [desc])— An outlined equilateral-triangle whose inner size is width-by-height with an outline of line-width. The inner triangle is transparent.

(outlined-polygon points color pen-width [description])— Create a polygon whose vertices are given by points and which is outlined by a color line whose width is given by line-width.

(outlined-rectangle width height color line-width [description])— A rectangle of the specified width and height, outlined with a line of the specified color and width.

(outlined-square side color line-width [description])— Create an outlined square with the given side length and color.

(overlay/align halignment valignment i1 i2 ... in [description])— Overlay the two images, aligning them as described.

(overlay img1 ... imgn [description])— Overlay img1 through imgn on top of each other, keeping them centered on each other.

P

(place img xside x yside y bg)— Place img on bg, with the xside of img at x and the yside of img at y. Crop the result at the edges of bg.

(polygon? img)— Determines whether img is a polygon.

(pt x y)— Make a point.

R

(rotate img angle [description])— Create a new image by rotating img by angle degrees counter-clockwise.

S

(solid-circle diameter color [description])— Create a solid circle with the given diameter and color.

(solid-ellipse width height color [description])— Create a width-by-height ellipse whose color is color.

(solid-equilateral-triangle? val)— Determines if val is a solid equilateral triangle.

(solid-equilateral-triangle edge color [description])— A solid equilateral triangle of the given edge length and color.

(solid-isosceles-triangle width height color [description])— A solid isosceles triangle of the given width, height, and color.

(solid-polygon points color [description])— Create a polygon whose vertices are given by points and whose color is color.

(solid-rectangle width height color [description])— A polygon whose vertices are given by points and whose color is color.

(solid-square side color [description])— Create a solid square with the given side length and color.

(solid-wedge radius angle color [description])— A wedge with the given radius, angle, and color.

(square? img)— Determines if img is a square (solid or outlined).

(subimages img)— Get a list of all the subimages of the current image.

V

(vflip img [description])— Flip img vertically.

(vshift img amt [description])— Shift img vertically down by amt. If amt is negative, shifts the image up and cuts off the top.