#include "image.h"
-#include "io.h"
#include "log.h"
#include "iolayer.h"
i_img *
i_readrgb_wiol(io_glue *ig, int length) {
i_img *img;
- int x, y, c,i;
+ int y, c,i;
int width, height, channels;
unsigned long maxlen;
int savemask;
- char *idstring = NULL;
-
rgb_header header;
unsigned char headbuf[512];
unsigned char *databuf;
- unsigned char *reorderbuf;
unsigned long *starttab, *lengthtab;
i_color *linebuf = NULL;
i_mempool mp;
channels = header.zsize;
img = i_img_empty_ch(NULL, width, height, channels);
+ if (!img)
+ return NULL;
i_tags_add(&img->tags, "rgb_namestr", 0, header.name, 80, 0);
-
+ i_tags_add(&img->tags, "i_format", 0, "rgb", -1, 0);
switch (header.storagetype) {
case 0: /* uncompressed */
break;
}
+ i_tags_add(&img->tags, "i_format", 0, "rgb", -1, 0);
+
i_mempool_destroy(&mp);
return img;
undef_int
i_writergb_wiol(i_img *img, io_glue *ig, int wierdpack, int compress, char *idstring, size_t idlen) {
-
-
-
+ i_clear_error();
+ i_push_error(0, "writing SGI RGB files is not implemented");
+ return 0;
}