[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ANN] Guile binding for libsimage
From: |
Lars J. Aas |
Subject: |
[ANN] Guile binding for libsimage |
Date: |
Mon, 7 May 2001 22:24:28 +0200 |
User-agent: |
Mutt/1.2.5i |
"simage" is a simple image file format import/export library that was
created for external texture file support in Coin, an Open Inventor clone
I am working on.
I've created a module that binds the most essential functionality of
the simage library to Guile. The module file is attached below so you
can view the exposed interface.
This module is only part of the CVS repository for simage at the moment
(no tarball yet), so interested parties will have to check it out with
the following commands:
$ cvs -d :pserver:address@hidden:/export/cvs login # password "cvs"
$ cvs -d :pserver:address@hidden:/export/cvs co simage
You will also find a simple sample program called "simage-convert.scm" in
the guile directory, that demonstrates how simage can be used from Guile
to resize images and convert between different file formats (for example
"simage-convert.scm --scale 2 2 input.gif output.jpg"). Sorry for the
poor quality/design of the simage-convert.scm utility :( Available formats
are GIF (libungif), JPEG (libjpeg), PNG (libpng), TIFF (tifflib), TGA,
RGB, and PIC. Some of them are only import.
Cheers,
Lars J
; simage.scm -- a guile module for interfacing with libsimage -*- scheme -*-
;
; Written by Lars J. Aas <address@hidden>.
; This file is Public Domain.
;
; $Revision: 1.1 $
(define-module (coin simage))
(let ((libhandle (dynamic-link "libguilesimage.so")))
(dynamic-call "guilesimage_init" libhandle))
(export
simage-version-major ; => integer
simage-version-minor ; => integer
simage-version-micro ; => integer
simage-get-last-error ; => string
simage-load-supported? ; filename => boolean
simage-load ; filename => simage-image
simage-resize ; simage-image width height => simage-image
simage-save-supported? ; extension => boolean
simage-save ; simage-image filename extension => boolean
simage-image-width ; simage-image => integer
simage-image-height ; simage-image => integer
simage-image-components ; simage-image => integer
)
; EOF ----------------------------------------------------------------------
- [ANN] Guile binding for libsimage,
Lars J. Aas <=