so im trying to make a background for a menu, but it is only so big. its not the kind of picture where i can just reapply it. is there a function to make it fill to the screen?
You mean stretch the image to take up more pixels? There is no build in SDL function to do it but you can always write your own, or use a library like SDL_gfx or SPriG.
then run on the pixels of the the new surface and blit to them pixel by pixel, (dunno of a more efficient way, well I do actually but that out of the scope).
1 2 3 4 5 6
for(int i=0; i<HEIGHT; ++i)
for(int j=0; j<WIDTH; ++j){
int oldX = ((float)j/WIDTH)*OLD_IMAGE_WIDTH;
int oldY = ((float)i/HEIGHT)*OLD_IMAGE_HEIGHT;
newSurface->pixels[i*WIDTH+j] = oldSurface->pixels[oldY*OLD_IMAGE_WIDTH+oldX];
}