Revert "[Tizen] Add screen and client rotation itself function"
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / gif-loading.cpp
index ba9db54..232c555 100755 (executable)
@@ -688,10 +688,20 @@ bool ReadHeader( LoaderInfo &loaderInfo,
         FILE * const fp = fileReader.GetFile();
         if ( NULL != fp )
         {
-          fseek( fp, 0, SEEK_SET );
-          fileData.globalMap = reinterpret_cast<GifByteType*>( malloc(sizeof( GifByteType ) * blobSize ) );
-          fileData.length = fread( fileData.globalMap, sizeof( GifByteType ), blobSize, fp);
-          fileInfo.map = fileData.globalMap;
+          if( ( ! fseek( fp, 0, SEEK_SET ) ) )
+          {
+            fileData.globalMap = reinterpret_cast<GifByteType*>( malloc(sizeof( GifByteType ) * blobSize ) );
+            fileData.length = fread( fileData.globalMap, sizeof( GifByteType ), blobSize, fp);
+            fileInfo.map = fileData.globalMap;
+          }
+          else
+          {
+            DALI_LOG_ERROR( "Error seeking within file\n" );
+          }
+        }
+        else
+        {
+          DALI_LOG_ERROR( "Error reading file\n" );
         }
       }
     }
@@ -1185,6 +1195,13 @@ public:
     ReadHeader( loaderInfo, imageProperties, &error );
   }
 
+  // Moveable but not copyable
+
+  Impl( const Impl& ) = delete;
+  Impl& operator=( const Impl& ) = delete;
+  Impl( Impl&& ) = default;
+  Impl& operator=( Impl&& ) = default;
+
   ~Impl()
   {
     if( loaderInfo.fileData.globalMap  )
@@ -1274,7 +1291,7 @@ bool GifLoading::LoadAllFrames( std::vector<Dali::PixelData> &pixelData, Dali::V
 
 ImageDimensions GifLoading::GetImageSize()
 {
-  return ImageDimensions( mImpl->imageProperties.w, mImpl->imageProperties.w );
+  return ImageDimensions( mImpl->imageProperties.w, mImpl->imageProperties.h );
 }
 
 int GifLoading::GetImageCount()