I got to do a function here that creates a copy of an image but with
bigger size. I dont want to make it bigger (scretch), only want it to resize! I
am using PNG images with alpha, the mouth and eyes are transparents! I
made it with Gimp:
But I got problems! The image is not how it should be, it is all white!
Here is how I am doing it:
loadedImage = IMG_Load(path); // I test to see if it loaded right, I removed to make it smaller
surface = SDL_DisplayFormatAlpha(loadedImage);
surface = redImage(surface->w2,surface->h2,surface);
SDL_Surface* redImage(int w,int h,SDL_Surface* src)
SDL_Surface* ret = SDL_CreateRGBSurface(src->flags,w,h,src->format->BitsPerPixel,
SDL_Surface* surface = SDL_DisplayFormatAlpha(ret);
I fell that I am making something wrong, tryed many things but nothing seems to work! Whats wrong with it?
Deixe suas conversas mais divertidas. Baixe agora mesmo novos emoticons. ? gr?tis!