nanogui: save image
Subject:
Re: [nanogui] save image
From:
Carlo Zinato ####@####.####
Date:
14 Nov 2007 13:08:57 +0000
Message-Id: <473AF363.70006@viscount.it>
pushparaj muthu ha scritto:
> Hi
>
> I have created image on window by using Grpoints nano -X API.
> Now I wanted to save image in the file .
> How to save image in a particulat file. I could not find any API for this.
If you compiled nano-X with LINK_APP_INTO_SERVER = Y you may use
GrNewPixmap(GR_SIZE width, GR_SIZE height, void *pixels) which allocates
some space into pixels (see srvfunc.c), then GrCopyArea to copy your
window into the id returned by GrNewPixmap, and save directly pixels[]
in a file. Don't forget to free(pixels) :)
AFAIK GrNewPixmap ignores void *pixels if LINK_APP_INTO_SERVER = N.
Some better solution for this?
Regards,
Carlo
>
>
> Raj
>
>
>
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.503 / Virus Database: 269.15.31/1129 - Release Date: 13/11/2007 21.22