Chicken bindings for the imlib2 image library.
imlib:alpha-set!
wasn't exportedNote: Not all imlib functionality is provided by this egg yet!
imlib:image
object which describes a transparent image of the given size.img
object is an imlib image.img
imlib:image
object which describes the image stored in the file filename
. This automatically uses the correct loader, as determined by Imlib2 on the basis of the file's extension.img
in the file filename
. The right loader is automatically selected by Imlib2 if you haven't set it explicitly with imlib:format-set!
.#f
if no format has been associated with it yet.imlib:save
. The format
argument is passed to the loaders in the same way a file extension would be.#f
.img
. By default, all images are cached by imlib2 in such a way that closing and reopening it just pulls it from cache instead of really loading it. Unfortunately, there's no way to request the status of this option or disable it.img
.img
horizontally.img
.img
vertically.img
. This works like transposing a matrix.img
diagonally.img
. According to imlib2 documentation, this function rotates the image by 90 degrees orientation
times. However, the function accepts values between 0 and 7, inclusive. What values 4-7 do, I'm not really sure of. They appear to rotate the image (mod orientation 3)
times 90 degrees, but flip it as well.img
. The radius
argument is an integer number indicating the degree of sharpening that has to take place. I am not sure what a negative value means, but it is allowed.img
. The radius
argument is a positive integer indicating the blur matrix radius, so 0 has no effect.img
adjusted in such a way around the edges, such that it is suitable for use in repeating ("tiled") patterns on all sides.img
adjusted on the left and right edges so it can be used for horizontally repeating patterns.img
adjusted on the top and bottom edges so it can be used for vertically repeating patterns.img
. The x
and y
parameters indicate the upper left pixel of the new image. The width
and height
parameters indicate the size of the new image. Returns #f
on failure. Note: This function will return an image of the requested size, but with undefined contents if you pass it arguments that lie outside the image! I am still unsure if this is a bug or feature.img
. The arguments src-x
, src-y
, src-width
and src-height
indicate cropping dimensions as per imlib:crop
, in the original image. The dest-width
and dest-height
arguments indicate the new image's width and height.Note: This could use some more work. Perhaps the functions fromthe previous section should return values of these types instead.
x1
,y1
) to (x2
,y2
.x
and y
coordinates are of the upper left corner of the rectangle.imlib:draw-rectangle
, but filled in.Copyright (c) 2005, 2006, Peter Bex (peter.bex@xs4all.nl) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of Peter Bex nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY PETER BEX AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.