chickadee » leptonic » pix-rotate-by-sampling

pix-rotate-by-samplingprocedure
  • in - PPIX
  • in - XCENT YCENT - x, y center of rotation
  • in - ANGLE - radians, + is clockwise
  • in - INCOLOR - fill-in from edges: select IN-WHITE or IN-BLACK
  • returns: rotated ppix, or #f if error.
(import leptonic)
(include "leptonic-types.scm")
(define-external imgpix ppix (pix-read "img0.jpg"))
;; rotate image about center 5 deg clockwise
;; get w and h
(define-external rotpix ppis
    (pix-rotate-by-sampling imgpix (/ w 2) (/ h 2) (deg2rad 5) {{IN-BLACK}}))
...
(pix-destroy (location imgpix))
(pix-destroy (location rotpix))