/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <dali/public-api/math/vector4.h>
#include <dali/devel-api/images/texture-set-image.h>
#include <dali/integration-api/debug.h>
+#include <dali/devel-api/adaptor-framework/file-loader.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/visuals/image-visual-properties.h>
if( mImageUrl.IsLocalResource() )
{
Vector2 dpi = Stage::GetCurrent().GetDpi();
- float meanDpi = (dpi.height + dpi.width) * 0.5f;
- mParsedImage = nsvgParseFromFile( mImageUrl.GetUrl().c_str(), UNITS, meanDpi );
+ float meanDpi = ( dpi.height + dpi.width ) * 0.5f;
+ Dali::Vector<char> buffer;
+ if ( Dali::FileLoader::ReadFile( mImageUrl.GetUrl(), buffer ) )
+ {
+ buffer.PushBack( '\0' );
+ mParsedImage = nsvgParse( buffer.Begin(), UNITS, meanDpi );
+ }
}
}