chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Read/Write PNG image


From: Matt Gushee
Subject: Re: [Chicken-users] Read/Write PNG image
Date: Thu, 19 Feb 2015 01:01:48 -0700

Hello--

On Wed, Feb 18, 2015 at 11:37 PM, Бомбин Валентин <address@hidden> wrote:

> I need read/write PNG. Where i can see example fo this? which library i need 
> use?

There are several eggs that you can use, including g2 and cairo;
however, these two are not really documented, so unless you
specifically need their capabilities, I wouldn't suggest using them.
Imlib2 is fairly easy to use and has better documentation. Anyway,
using imlib2:

    (use imlib2)

    ; New image
    (let ((img (image-create 720 480)))
        ; Manipulate image
        (image-save img "my-image.png"))

    ; Existing image
    (let ((img (image-load "other-image.png")))
        ; Manipulate image
        (image-save img "other-image.png"))

I think you can also use OpenGL and some other eggs to work with PNGs,
but imlib2 is probably the simplest.

HTH

--
Matt Gushee



reply via email to

[Prev in Thread] Current Thread [Next in Thread]