X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fimaging%2Fcommon%2Floader-wbmp.cpp;h=05d7aa08da8599beb81ff7c5d7596b226b0b55d7;hb=c1bb1606717a5a831a0e7bdaca8b4eb86dc5a89e;hp=58c3c34acb3cd75860dfe33997cd565d1a5e8077;hpb=28f03d5fc09b0851b233cefbaff7e3bdb24c94e4;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/imaging/common/loader-wbmp.cpp b/dali/internal/imaging/common/loader-wbmp.cpp old mode 100644 new mode 100755 index 58c3c34..05d7aa0 --- a/dali/internal/imaging/common/loader-wbmp.cpp +++ b/dali/internal/imaging/common/loader-wbmp.cpp @@ -27,6 +27,10 @@ #include #include +#include + +using namespace Dali::Internal::Platform; + namespace Dali { @@ -90,7 +94,7 @@ int extractMultiByteInteger(unsigned int *data, void *map, size_t length, size_t }// end unnamed namespace -bool LoadBitmapFromWbmp( const ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap ) +bool LoadBitmapFromWbmp( const Dali::ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap ) { FILE* const fp = input.file; if(fp == NULL) @@ -108,12 +112,12 @@ bool LoadBitmapFromWbmp( const ImageLoader::Input& input, Dali::Devel::PixelBuff unsigned char *line = NULL; unsigned int cur = 0, x, y; - if( fseek(fp,0,SEEK_END) ) + if( InternalFile::fseek(fp,0,SEEK_END) ) { DALI_LOG_ERROR("Error seeking WBMP data\n"); return false; } - long positionIndicator = ftell(fp); + long positionIndicator = InternalFile::ftell(fp); unsigned int fsize( 0u ); if( positionIndicator > -1L ) @@ -127,7 +131,7 @@ bool LoadBitmapFromWbmp( const ImageLoader::Input& input, Dali::Devel::PixelBuff return false; } - if( fseek(fp, 0, SEEK_SET) ) + if( InternalFile::fseek(fp, 0, SEEK_SET) ) { DALI_LOG_ERROR("Error seeking WBMP data\n"); return false; @@ -144,7 +148,7 @@ bool LoadBitmapFromWbmp( const ImageLoader::Input& input, Dali::Devel::PixelBuff } map.Resize(fsize); - if(fread(&map[0], 1, fsize, fp) != fsize) + if( InternalFile::fread(&map[0], 1, fsize, fp) != fsize) { DALI_LOG_WARNING("image file read opeation error!\n"); return false; @@ -211,7 +215,7 @@ bool LoadBitmapFromWbmp( const ImageLoader::Input& input, Dali::Devel::PixelBuff } -bool LoadWbmpHeader( const ImageLoader::Input& input, unsigned int& width, unsigned int& height ) +bool LoadWbmpHeader( const Dali::ImageLoader::Input& input, unsigned int& width, unsigned int& height ) { FILE* const fp = input.file; if(fp == NULL) @@ -224,12 +228,12 @@ bool LoadWbmpHeader( const ImageLoader::Input& input, unsigned int& width, unsig unsigned int w, h; unsigned int type; - if( fseek(fp,0,SEEK_END) ) + if( InternalFile::fseek(fp,0,SEEK_END) ) { DALI_LOG_ERROR("Error seeking WBMP data\n"); return false; } - long positionIndicator = ftell(fp); + long positionIndicator = InternalFile::ftell(fp); unsigned int fsize( 0u ); if( positionIndicator > -1L ) @@ -242,7 +246,7 @@ bool LoadWbmpHeader( const ImageLoader::Input& input, unsigned int& width, unsig return false; } - if( fseek(fp, 0, SEEK_SET) ) + if( InternalFile::fseek(fp, 0, SEEK_SET) ) { DALI_LOG_ERROR("Error seeking WBMP data\n"); return false; @@ -258,7 +262,7 @@ bool LoadWbmpHeader( const ImageLoader::Input& input, unsigned int& width, unsig headerSize = std::min(headerSize, fsize); map.Resize(headerSize); - if(fread(&map[0], 1, headerSize, fp) != headerSize) + if( InternalFile::fread(&map[0], 1, headerSize, fp) != headerSize) { DALI_LOG_WARNING("image file read opeation error!\n"); return false;