#include <dali/devel-api/adaptor-framework/image-loading.h>
#include <dali/internal/imaging/common/pixel-buffer-impl.h>
-#include <dali/internal/system/common/file-closer.h>
-
-using namespace Dali::Internal::Platform;
-
namespace
{
using Dali::Vector;
return true;
}
-bool LoadBitmapFromJpeg( const ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap )
+bool LoadBitmapFromJpeg( const Dali::ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap )
{
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 )
{
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;
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");
}
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");
}
auto exifLoader = std::unique_ptr<ExifLoader, decltype(exif_loader_unref)*>{
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;
return exifData;
}
-bool LoadJpegHeader( const ImageLoader::Input& input, unsigned int& width, unsigned int& height )
+bool LoadJpegHeader( const Dali::ImageLoader::Input& input, unsigned int& width, unsigned int& height )
{
unsigned int requiredWidth = input.scalingParameters.dimensions.GetWidth();
unsigned int requiredHeight = input.scalingParameters.dimensions.GetHeight();