#import "RASF.h"
Definition at line 13 of file RASF.h.
- (id) open: |
|
(char *) |
filename |
|
Definition at line 36 of file RASF.m.
References Image::b, Image::displayImage, Image::fileName, Image::g, Image::numColors, Image::r, Image::rmap, Image::thisview, Image::xsize, and Image::ysize.
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));
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);
static unsigned char blue[256]
static unsigned char green[256]
strncpy(windowIconName,"rasf.icon.tiff", 14)
static unsigned char red[256]
The documentation for this class was generated from the following files: