IMG_tif.c
changeset 343 5bf0f0d6a74e
parent 320 aa5d55b11751
child 347 ad5034cad524
     1.1 --- a/IMG_tif.c	Sun Jan 27 15:55:03 2013 -0800
     1.2 +++ b/IMG_tif.c	Sun Feb 03 08:37:28 2013 -0800
     1.3 @@ -165,19 +165,19 @@
     1.4  
     1.5  static toff_t tiff_size(thandle_t fd)
     1.6  {
     1.7 -	Uint32 save_pos;
     1.8 +	Sint64 save_pos;
     1.9  	toff_t size;
    1.10  
    1.11  	save_pos = SDL_RWtell((SDL_RWops*)fd);
    1.12  	SDL_RWseek((SDL_RWops*)fd, 0, RW_SEEK_END);
    1.13 -        size = SDL_RWtell((SDL_RWops*)fd);
    1.14 +    size = SDL_RWtell((SDL_RWops*)fd);
    1.15  	SDL_RWseek((SDL_RWops*)fd, save_pos, RW_SEEK_SET);
    1.16  	return size;
    1.17  }
    1.18  
    1.19  int IMG_isTIF(SDL_RWops* src)
    1.20  {
    1.21 -	int start;
    1.22 +	Sint64 start;
    1.23  	int is_TIF;
    1.24  	Uint8 magic[4];
    1.25  
    1.26 @@ -203,7 +203,7 @@
    1.27  
    1.28  SDL_Surface* IMG_LoadTIF_RW(SDL_RWops* src)
    1.29  {
    1.30 -	int start;
    1.31 +	Sint64 start;
    1.32  	TIFF* tiff;
    1.33  	SDL_Surface* surface = NULL;
    1.34  	Uint32 img_width, img_height;
    1.35 @@ -240,7 +240,7 @@
    1.36  	if(!surface)
    1.37  		goto error;
    1.38  	
    1.39 -	if(!lib.TIFFReadRGBAImage(tiff, img_width, img_height, surface->pixels, 0))
    1.40 +	if(!lib.TIFFReadRGBAImage(tiff, img_width, img_height, (uint32 *)surface->pixels, 0))
    1.41  		goto error;
    1.42  
    1.43  	/* libtiff loads the image upside-down, flip it back */