Hey everyone!
So I’d like to make a picture of mine the background of my app. It is just a gradiently colored picture, 1080*1920, you get the idea.
However, when I print it on the screen, it can’t display every color, so it gets really bad quality. My phone is an LG G2, so it can display all kinds of colors…What is the problem here?
Code i’m using:
Code:
int main(int argc, char *argv[])
{
int w,h;
PICTURE picture;
SDL_Window *window;
SDL_Renderer *renderer;
SDL_Surface *surface;
SDL_CreateWindowAndRenderer(0, 0, 0, &window, &renderer);
SDL_GetWindowSize(window,&w,&h);
surface=SDL_LoadBMP("backg.bmp");
picture.w=surface->w;
picture.h=surface->h;
picture.texture=SDL_CreateTextureFromSurface(renderer, surface);
SDL_FreeSurface(surface);
SDL_Rect destination={0,0,picture.w,picture.h};
SDL_RenderClear(renderer);
SDL_RenderCopy(renderer,picture.texture,NULL,&destination);
SDL_RenderPresent(renderer);
SDL_Delay(100000);
return 0;
}
Also, would installing SDL_Image work? I tried it, but I couldn’t get it working, if anybody got a guide, that would be great.
Thanks in advance!