Logo Search packages:      
Sourcecode: blender version File versions

struct ImBuf* IMB_loadiffmem ( int *  mem,
int  flags 
) [read]

Attention:
defined in readimage.c
Deprecated:
Only here for backwards compatibility of the
Deprecated:
plugin system.

Definition at line 164 of file readimage.c.

References IMB_loadiffmem().

Referenced by IMB_loadiffmem().

                                                  {
      int len,maxlen;
      struct ImBuf *ibuf;

      // IMB_loadiffmem shouldn't be used anymore in new development
      // it's still here to be backwards compatible...

      maxlen= (GET_BIG_LONG(mem+1) + 1) & ~1;

      if (GET_ID(mem) == CAT){
            mem += 3;
            maxlen -= 4;
            while(maxlen > 0){
                  if (GET_ID(mem) == FORM){
                        len = ((GET_BIG_LONG(mem+1) + 1) & ~1) + 8;
                        if ((GET_ID(mem+2) == ILBM) || (GET_ID(mem+2) == ANIM)) break;
                        mem = (int *)((uchar *)mem +len);
                        maxlen -= len;
                  } else return(0);
            }
      }

      if (maxlen > 0){
            if (GET_ID(mem) == FORM){
                  if (GET_ID(mem+2) == ILBM){
                        return (imb_loadamiga(mem, flags));
                  } else if (GET_ID(mem+5) == ILBM){              /* animaties */
                        return (imb_loadamiga(mem+3, flags));
                  } else if (GET_ID(mem+2) == ANIM){
                        return (imb_loadanim(mem, flags));
                  }
            } else if ((GS(mem) == IMAGIC) || (GSS(mem) == IMAGIC)){
                  return (imb_loadiris((uchar *) mem,flags));
            } else if ((BIG_LONG(mem[0]) & 0xfffffff0) == 0xffd8ffe0) {
                  return (0);
            }
      }

      ibuf = imb_loadtarga((uchar *) mem,flags);
      if (ibuf) return(ibuf);

      if (IB_verbose) fprintf(stderr,"Unknown fileformat\n");
      return (0);
}


Generated by  Doxygen 1.6.0   Back to index