Logo Search packages:      
Sourcecode: blender version File versions

struct ImBuf* IMB_loadiffname ( char *  naam,
int  flags 
) [read]

Attention:
Defined in readimage.c

Definition at line 253 of file readimage.c.

References IMB_de_interlace(), IMB_loadifffile(), IMB_loadiffname(), and ImBuf::name.

Referenced by IMB_anim_absolute(), and IMB_loadiffname().

                                                     {
      int file;
      struct ImBuf *ibuf;
      int buf[1];

      file = open(naam, O_BINARY|O_RDONLY);

      if (file == -1) return (0);

      ibuf= IMB_loadifffile(file, flags);

      if (ibuf == 0) {
            if (read(file, buf, 4) != 4) buf[0] = 0;
            if ((BIG_LONG(buf[0]) & 0xfffffff0) == 0xffd8ffe0)
                  ibuf = imb_ibJpegImageFromFilename(naam, flags);                  
      }

      if (ibuf) {
            strncpy(ibuf->name, naam, sizeof(ibuf->name));
            if (flags & IB_fields) IMB_de_interlace(ibuf);
      }
      close(file);
      return(ibuf);
}


Generated by  Doxygen 1.6.0   Back to index