nanogui: GdLoadImageFromFile
Subject:
GdLoadImageFromFile
From:
Iris Huang ####@####.####
Date:
2 Jan 2002 18:19:35 -0000
Message-Id: <3C334F78.6000705@techsol.ca>
Dear all,
Happy new year!
In microwin/src/engine/devimage.c, could some one explain or document
this GdLoadImageFromFile(), especially "if (fd < 0 || fstat(fd, &s) < 0)"?
int
GdLoadImageFromFile(PSD psd, char *path, int flags)
{
int fd, id;
struct stat s;
void *buffer = 0;
buffer_t src;
fd = open(path, O_RDONLY);
if (fd < 0 || fstat(fd, &s) < 0) {
EPRINTF("GdLoadImageFromFile: can't open image %s\n", path);
return(0);
}
when I try to draw or load image using nano-X, I always get this error:
"GdLoadImageFromFile: can't open image ...".
Iris