SDL QueryTexture Use this function to query the attributes of a texture. int SDL_QueryTexture(SDL_Texture* texture, Uint32* format, int* access, int* w, int* h) Favorite site SDL Wiki: SDL_QueryTexture