7 #import <appkit/Window.h>
8 #import <appkit/Panel.h>
9 #import <appkit/tiff.h>
41 unsigned char red,green,blue,n;
42 unsigned char buf[80];
48 if ((fp = NXMapFile(fileName,NX_READONLY)) == NULL) {
49 NXRunAlertPanel(
"RASF ERROR",
"Can't open %s", NULL, NULL, NULL, fileName);
54 NXRead(fp,buf,
sizeof(
char)*8);
55 if(strncmp((
char *)buf,
"gl RASF",8)){
56 NXRunAlertPanel(
"RASF ERROR",
"%s Not an RASF file ", NULL, NULL, NULL,
fileName);
62 NXRead(fp,&red,
sizeof(
char));
64 NXRead(fp,&red,
sizeof(
char));
65 NXRead(fp,&green,
sizeof(
char));
69 NXRead(fp,&red,
sizeof(
char));
71 NXRead(fp,&red,
sizeof(
char));
72 NXRead(fp,&green,
sizeof(
char));
77 NXRead(fp,&red,
sizeof(
char));
81 r = (
unsigned char *)NXZoneMalloc(newZone,ysize*xsize*(
sizeof(
unsigned char)));
82 g = (
unsigned char *)NXZoneMalloc(newZone,ysize*xsize*(
sizeof(
unsigned char)));
83 b = (
unsigned char *)NXZoneMalloc(newZone,ysize*xsize*(
sizeof(
unsigned char)));
86 for (y=(
ysize-1);y>=0;y--){
87 for (x=0;x<
xsize;x++){
89 NXRead(fp,&red,
sizeof(
char));
90 NXRead(fp,&green,
sizeof(
char));
91 NXRead(fp,&blue,
sizeof(
char));
92 NXRead(fp,&n,
sizeof(
char));
110 NXCloseMemory(fp,NX_FREEBUFFER);
char windowIconName[1024]