File: magick.scm

package info (click to toggle)
gauche-c-wrapper 0.6.1-18
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,440 kB
  • sloc: ansic: 17,899; sh: 14,025; asm: 6,456; lisp: 5,485; yacc: 2,109; makefile: 520; exp: 194; cpp: 157; objc: 144; perl: 2
file content (22 lines) | stat: -rw-r--r-- 657 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
(use c-wrapper)

(c-load '("stdio.h" "wand/magick_wand.h")
        :cppflags-cmd "Wand-config --cppflags"
        :ldflags-cmd "Wand-config --ldflags"
        :libs-cmd "Wand-config --libs"
        :compiled-lib "magicklib")

(define (main args)
  (MagickWandGenesis)
  (let ((magick-wand (NewMagickWand)))
    (MagickReadImage magick-wand "bear.jpg")
    (MagickResetIterator magick-wand)
    (MagickNextImage magick-wand)
    (MagickResizeImage magick-wand 100 75 LanczosFilter 1.0)
    (MagickWriteImages magick-wand "thumbnail.png" MagickTrue)
    (print "thumbnail.png is created.")
    (DestroyMagickWand magick-wand)
    (MagickWandTerminus))
  0)