X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fimaging%2Fcommon%2Floader-jpeg-turbo.cpp;h=87673a72384f297b84cf395a05e44efcda02e6e6;hb=refs%2Ftags%2Fsubmit%2Ftizen%2F20190130.054421;hp=2566d26868de76377f2ecfd836b529cdfec9db90;hpb=c217ca0b9547a4a3170d9e6390d4914500a0db58;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/imaging/common/loader-jpeg-turbo.cpp b/dali/internal/imaging/common/loader-jpeg-turbo.cpp index 2566d26..87673a7 100755 --- a/dali/internal/imaging/common/loader-jpeg-turbo.cpp +++ b/dali/internal/imaging/common/loader-jpeg-turbo.cpp @@ -42,6 +42,10 @@ #include #include +#include + +using namespace Dali::Internal::Platform; + namespace { using Dali::Vector; @@ -533,13 +537,13 @@ bool LoadBitmapFromJpeg( const Dali::ImageLoader::Input& input, Dali::Devel::Pix const int flags= 0; FILE* const fp = input.file; - if( fseek(fp,0,SEEK_END) ) + if( InternalFile::fseek(fp,0,SEEK_END) ) { DALI_LOG_ERROR("Error seeking to end of file\n"); return false; } - long positionIndicator = ftell(fp); + long positionIndicator = InternalFile::ftell(fp); unsigned int jpegBufferSize = 0u; if( positionIndicator > -1L ) { @@ -551,7 +555,7 @@ bool LoadBitmapFromJpeg( const Dali::ImageLoader::Input& input, Dali::Devel::Pix return false; } - if( fseek(fp, 0, SEEK_SET) ) + if( InternalFile::fseek(fp, 0, SEEK_SET) ) { DALI_LOG_ERROR("Error seeking to start of file\n"); return false; @@ -570,13 +574,13 @@ bool LoadBitmapFromJpeg( const Dali::ImageLoader::Input& input, Dali::Devel::Pix unsigned char * const jpegBufferPtr = jpegBuffer.Begin(); // Pull the compressed JPEG image bytes out of a file and into memory: - if( fread( jpegBufferPtr, 1, jpegBufferSize, fp ) != jpegBufferSize ) + if( InternalFile::fread( jpegBufferPtr, 1, jpegBufferSize, fp ) != jpegBufferSize ) { DALI_LOG_WARNING("Error on image file read.\n"); return false; } - if( fseek(fp, 0, SEEK_SET) ) + if( InternalFile::fseek(fp, 0, SEEK_SET) ) { DALI_LOG_ERROR("Error seeking to start of file\n"); } @@ -1086,7 +1090,7 @@ ExifHandle LoadExifData( FILE* fp ) auto exifData = MakeNullExifData(); unsigned char dataBuffer[1024]; - if( fseek( fp, 0, SEEK_SET ) ) + if( InternalFile::fseek( fp, 0, SEEK_SET ) ) { DALI_LOG_ERROR("Error seeking to start of file\n"); } @@ -1095,9 +1099,9 @@ ExifHandle LoadExifData( FILE* fp ) auto exifLoader = std::unique_ptr{ exif_loader_new(), exif_loader_unref }; - while( !feof(fp) ) + while( !InternalFile::feof(fp) ) { - int size = fread( dataBuffer, 1, sizeof( dataBuffer ), fp ); + int size = InternalFile::fread( dataBuffer, 1, sizeof( dataBuffer ), fp ); if( size <= 0 ) { break;