// INTERNAL INCLUDES
#include "image-loaders/image-loader.h"
#include <resource-loader/network/file-download.h>
-#include <platform-abstractions/portable/file-closer.h>
+#include <platform-abstractions/portable/file-reader.h>
#include "pixel-buffer-impl.h"
namespace Dali
{
Integration::BitmapResourceType resourceType( size, fittingMode, samplingMode, orientationCorrection );
- Internal::Platform::FileCloser fc( url.c_str(), "rb");
- FILE * const fp = fc.GetFile();
+ Internal::Platform::FileReader fileReader( url );
+ FILE * const fp = fileReader.GetFile();
if( fp != NULL )
{
Integration::BitmapPtr bitmap;
MAXIMUM_DOWNLOAD_IMAGE_SIZE );
if( succeeded )
{
- void *blobBytes = static_cast<void*>(&dataBuffer[0]);
size_t blobSize = dataBuffer.Size();
DALI_ASSERT_DEBUG( blobSize > 0U );
- DALI_ASSERT_DEBUG( blobBytes != 0U );
- if( blobBytes != 0 && blobSize > 0U )
+ if( blobSize > 0U )
{
// Open a file handle on the memory buffer:
- Dali::Internal::Platform::FileCloser fileCloser( blobBytes, blobSize, "rb" );
- FILE * const fp = fileCloser.GetFile();
+ Dali::Internal::Platform::FileReader fileReader( dataBuffer, blobSize );
+ FILE * const fp = fileReader.GetFile();
if ( NULL != fp )
{
Integration::BitmapPtr bitmap;