#include #include #include "readpic.h" #include "pic.h" #include //============================================================ // Image API. //============================================================ bool PIC_LoadPic(const std::string &path, std::vector &tampon, uint &Width, uint &Height) { uint32 id; unsigned char *pal, *data; unsigned long w,h,depth; uint i; // Loadons l'image. id= PIC_Load((char*)path.c_str(), 0); if(id==0) return false; PIC_GetInfos( id, &pal, &data, &w, &h, &depth); Width=w; Height=h; // On traduit en RGBA. tampon.resize(w*h); switch(depth) { case 8: for(i=0;i