projects
/
platform
/
core
/
uifw
/
dali-adaptor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "[4.0] Exposing Exif Image metadata"
[platform/core/uifw/dali-adaptor.git]
/
adaptors
/
devel-api
/
adaptor-framework
/
image-loading.cpp
diff --git
a/adaptors/devel-api/adaptor-framework/image-loading.cpp
b/adaptors/devel-api/adaptor-framework/image-loading.cpp
index
e2f896b
..
2beb24d
100644
(file)
--- a/
adaptors/devel-api/adaptor-framework/image-loading.cpp
+++ b/
adaptors/devel-api/adaptor-framework/image-loading.cpp
@@
-20,7
+20,7
@@
// INTERNAL INCLUDES
#include "image-loaders/image-loader.h"
#include <resource-loader/network/file-download.h>
// INTERNAL INCLUDES
#include "image-loaders/image-loader.h"
#include <resource-loader/network/file-download.h>
-#include <platform-abstractions/portable/file-
clos
er.h>
+#include <platform-abstractions/portable/file-
read
er.h>
#include "pixel-buffer-impl.h"
namespace Dali
#include "pixel-buffer-impl.h"
namespace Dali
@@
-40,8
+40,8
@@
Devel::PixelBuffer LoadImageFromFile( const std::string& url, ImageDimensions si
{
Integration::BitmapResourceType resourceType( size, fittingMode, samplingMode, orientationCorrection );
{
Integration::BitmapResourceType resourceType( size, fittingMode, samplingMode, orientationCorrection );
- Internal::Platform::File
Closer fc( url.c_str(), "rb"
);
- FILE * const fp = f
c
.GetFile();
+ Internal::Platform::File
Reader fileReader( url
);
+ FILE * const fp = f
ileReader
.GetFile();
if( fp != NULL )
{
Integration::BitmapPtr bitmap;
if( fp != NULL )
{
Integration::BitmapPtr bitmap;
@@
-93,17
+93,15
@@
Devel::PixelBuffer DownloadImageSynchronously( const std::string& url, ImageDime
MAXIMUM_DOWNLOAD_IMAGE_SIZE );
if( succeeded )
{
MAXIMUM_DOWNLOAD_IMAGE_SIZE );
if( succeeded )
{
- void *blobBytes = static_cast<void*>(&dataBuffer[0]);
size_t blobSize = dataBuffer.Size();
DALI_ASSERT_DEBUG( blobSize > 0U );
size_t blobSize = dataBuffer.Size();
DALI_ASSERT_DEBUG( blobSize > 0U );
- DALI_ASSERT_DEBUG( blobBytes != 0U );
- if( blob
Bytes != 0 && blob
Size > 0U )
+ if( blobSize > 0U )
{
// Open a file handle on the memory buffer:
{
// Open a file handle on the memory buffer:
- Dali::Internal::Platform::File
Closer fileCloser( blobBytes, blobSize, "rb"
);
- FILE * const fp = file
Clos
er.GetFile();
+ Dali::Internal::Platform::File
Reader fileReader( dataBuffer, blobSize
);
+ FILE * const fp = file
Read
er.GetFile();
if ( NULL != fp )
{
Integration::BitmapPtr bitmap;
if ( NULL != fp )
{
Integration::BitmapPtr bitmap;