X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fimaging%2Fcommon%2Floader-jpeg-turbo.cpp;h=7d78d71bd11bcb33e9934eb026d716763b6c9605;hb=783e17c94e8adc4bd624031af599922c9eb1e0c6;hp=ce1bba3f039bb380e496be4cff545e9f0d4de389;hpb=90da392b4640c1f188aba0ec8f9a9fc0d6eedaa8;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 ce1bba3..7d78d71 100644 --- a/dali/internal/imaging/common/loader-jpeg-turbo.cpp +++ b/dali/internal/imaging/common/loader-jpeg-turbo.cpp @@ -42,10 +42,6 @@ #include #include -#include - -using namespace Dali::Internal::Platform; - namespace { using Dali::Vector; @@ -228,7 +224,7 @@ void AddExifFieldPropertyMap( Dali::Property::Map& out, const ExifEntry& entry, { case EXIF_FORMAT_ASCII: { - out.Insert( shortName, std::string(reinterpret_cast(entry.data)) ); + out.Insert( shortName, std::string( reinterpret_cast(entry.data), entry.size ) ); break; } case EXIF_FORMAT_SHORT: @@ -537,13 +533,13 @@ bool LoadBitmapFromJpeg( const ImageLoader::Input& input, Dali::Devel::PixelBuff const int flags= 0; FILE* const fp = input.file; - if( InternalFile::fseek(fp,0,SEEK_END) ) + if( fseek(fp,0,SEEK_END) ) { DALI_LOG_ERROR("Error seeking to end of file\n"); return false; } - long positionIndicator = InternalFile::ftell(fp); + long positionIndicator = ftell(fp); unsigned int jpegBufferSize = 0u; if( positionIndicator > -1L ) { @@ -555,7 +551,7 @@ bool LoadBitmapFromJpeg( const ImageLoader::Input& input, Dali::Devel::PixelBuff return false; } - if( InternalFile::fseek(fp, 0, SEEK_SET) ) + if( fseek(fp, 0, SEEK_SET) ) { DALI_LOG_ERROR("Error seeking to start of file\n"); return false; @@ -574,13 +570,13 @@ bool LoadBitmapFromJpeg( const ImageLoader::Input& input, Dali::Devel::PixelBuff unsigned char * const jpegBufferPtr = jpegBuffer.Begin(); // Pull the compressed JPEG image bytes out of a file and into memory: - if( InternalFile::fread( jpegBufferPtr, 1, jpegBufferSize, fp ) != jpegBufferSize ) + if( fread( jpegBufferPtr, 1, jpegBufferSize, fp ) != jpegBufferSize ) { DALI_LOG_WARNING("Error on image file read.\n"); return false; } - if( InternalFile::fseek(fp, 0, SEEK_SET) ) + if( fseek(fp, 0, SEEK_SET) ) { DALI_LOG_ERROR("Error seeking to start of file\n"); } @@ -1090,7 +1086,7 @@ ExifHandle LoadExifData( FILE* fp ) auto exifData = MakeNullExifData(); unsigned char dataBuffer[1024]; - if( InternalFile::fseek( fp, 0, SEEK_SET ) ) + if( fseek( fp, 0, SEEK_SET ) ) { DALI_LOG_ERROR("Error seeking to start of file\n"); } @@ -1099,9 +1095,9 @@ ExifHandle LoadExifData( FILE* fp ) auto exifLoader = std::unique_ptr{ exif_loader_new(), exif_loader_unref }; - while( !InternalFile::feof(fp) ) + while( !feof(fp) ) { - int size = InternalFile::fread( dataBuffer, 1, sizeof( dataBuffer ), fp ); + int size = fread( dataBuffer, 1, sizeof( dataBuffer ), fp ); if( size <= 0 ) { break;