gfx:image2image

(gfx:image2image src-image dest-image alpha [dest-bounds] [src-bounds])


Description:

Draw src-image onto dest-image with an alpha transparency. src-image can be either nsimage or ciimage. dst-image must be an nsimage. dest-bounds and src-bounds are optional


Arguments:

          alpha -- alpha transparency

     dest-image -- destination image (nsimage)

     src-bounds -- optional bounds for source (where bounds is a list of x y w h)

      src-image -- source image (ciimage or nsimage)

    dest-bounds -- optional bounds for destination (where bounds is a list of x y w h)


Returns: boolean


Examples:

(define loop

   (lambda (time movie-time)

      (let* ((image (gfx:get-movie-frame movie movie-time))

             (filtered-image (gfx:filter-image image "CIEdges" torus-params)))

         (gfx:image2image image filtered-image 1.0 '(50 50 50 50) '(50 50 50 50))

         (gfx:draw-image time canvas filtered-image 1.0)

         (set! time (+ time frame-length))

         (if (> movie-time lgth)

             (callback (- time 4000) 'loop time 0.0)

             (callback (- time 4000) 'loop time (+ movie-time 0.1))))))



Back to index