Original Post
I have an SDL_Surface* with an overal majority color. I'm having trouble extracting the rgb from the pixel data. if I do: SDL_Surface *tmp = SDL_CreateRGBSurface(SDL_HWSURFACE, 100, 100, 24, 0,0,0,0); SDL_FillRect(tmp,0, SDL_MapRGBA(CORE->SDLGLwin->format, 255,0,0,0)); int pix = *(int*)tmp->pixels; pix is 16711680 and 0, 255, 255 is -16711681 I believe this is 1 or 2's complement. My problem is I'm not surev how int numbers are stored (in the binary sense). How can I extract the rgb given a binary number.