Changeset 534 for trunk/src/image/png_loader.cc
- Timestamp:
- 01/12/17 14:41:17 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/image/png_loader.cc
r487 r534 1 // Copyright (C) 2015-201 5ChaosForge Ltd1 // Copyright (C) 2015-2017 ChaosForge Ltd 2 2 // http://chaosforge.org/ 3 3 // … … 251 251 int remaining() 252 252 { 253 return m_img_buffer_end - m_img_buffer;253 return (int)( m_img_buffer_end - m_img_buffer ); 254 254 } 255 255 … … 865 865 866 866 case STBI__PNG_TYPE( 'I', 'E', 'N', 'D' ): { 867 uint32 raw_len, bpl; 867 size_t raw_len; 868 uint32 bpl; 868 869 if ( first ) return stbi__err( "first not IHDR", "Corrupt PNG" ); 869 870 if ( scan != STBI__SCAN_load ) return 1; … … 882 883 else 883 884 s->img_out_n = s->img_n; 884 if ( !stbi__create_png_image( z, z->expanded, raw_len, s->img_out_n, depth, color, interlace ) ) return 0;885 if ( !stbi__create_png_image( z, z->expanded, int( raw_len ), s->img_out_n, depth, color, interlace ) ) return 0; 885 886 if ( has_trans ) 886 887 if ( !stbi__compute_transparency( z, tc, s->img_out_n ) ) return 0; … … 977 978 static int stbi__stream_read( void *user, char *data, int size ) 978 979 { 979 return reinterpret_cast<stream*>( user )->read( data, 1, size );980 return (int)reinterpret_cast<stream*>( user )->read( data, 1, size ); 980 981 } 981 982 … … 1022 1023 if ( stbi__png_info( &s, &x, &y, &comp ) == 1 ) 1023 1024 { 1024 str.seek( pos, origin::SET );1025 str.seek( (long)pos, origin::SET ); 1025 1026 format.type = UBYTE; 1026 1027 switch ( comp )
Note: See TracChangeset
for help on using the changeset viewer.