Allows the image loader to obtain the plugin's bitmap loader.
we can add an image loader through the dali-extension plugin.
Change-Id: I1c9bd58ad6075bbe4049ed6753b2b833ae0b766e
// Check the header file.
unsigned int width(0), height(0);
- const Dali::TizenPlatform::ImageLoader::Input input( fp );
+ const Dali::ImageLoader::Input input( fp );
DALI_TEST_CHECK( functions.header( input, width, height ) );
DALI_TEST_EQUALS( width, image.reportedWidth, TEST_LOCATION );
// Check the header file.
unsigned int width = 0, height = 0;
- const Dali::TizenPlatform::ImageLoader::Input input( filePointer );
+ const Dali::ImageLoader::Input input( filePointer );
DALI_TEST_CHECK( functions.header( input, width, height ) );
DALI_TEST_EQUALS( width, image.reportedWidth, TEST_LOCATION );
AutoCloseFile autoClose( fp );
Dali::Devel::PixelBuffer bitmap;
- const Dali::TizenPlatform::ImageLoader::Input input( fp );
+ const Dali::ImageLoader::Input input( fp );
DALI_TEST_CHECK( functions.loader( input, bitmap ) );
#include <dali/dali.h>
#include <dali/integration-api/bitmap.h>
#include <dali/devel-api/adaptor-framework/pixel-buffer.h>
-#include <dali/internal/imaging/common/image-loader-input.h>
+#include <dali/devel-api/adaptor-framework/image-loader-input.h>
// Simple structure to close the file when finished with it.
struct AutoCloseFile
*/
struct LoadFunctions
{
- typedef bool (*LoadBitmapFunction)( const Dali::TizenPlatform::ImageLoader::Input& input, Dali::Devel::PixelBuffer& );
- typedef bool (*LoadBitmapHeaderFunction)( const Dali::TizenPlatform::ImageLoader::Input& input, unsigned int& width, unsigned int& height );
+ typedef bool (*LoadBitmapFunction)( const Dali::ImageLoader::Input& input, Dali::Devel::PixelBuffer& );
+ typedef bool (*LoadBitmapHeaderFunction)( const Dali::ImageLoader::Input& input, unsigned int& width, unsigned int& height );
LoadFunctions( LoadBitmapHeaderFunction _header, LoadBitmapFunction _loader );
LoadBitmapHeaderFunction header;
// Check the header file.
unsigned int width( 0 ), height( 0 );
- const Dali::TizenPlatform::ImageLoader::Input input( fileDescriptor );
+ const Dali::ImageLoader::Input input( fileDescriptor );
// Use the given loader to parse the image header.
DALI_TEST_CHECK( testEntry.loadFunctions.header( input, width, height ) );
// EXTERNAL INCLUDES
#include <cstdio>
#include <dali/public-api/images/image-operations.h>
+#include <dali/devel-api/adaptor-framework/pixel-buffer.h>
+#include <dali/integration-api/bitmap.h>
// INTERNAL INCLUDES
namespace Dali
{
-namespace TizenPlatform
-{
namespace ImageLoader
{
-
/**
* @brief A simple immutable struct to bundle together parameters for scaling an image.
- * @ToDo Move this to adaptor internal?
- * @ToDo Rename it after the move to ImageScalingParameters.
*/
class ScalingParameters
{
bool reorientationRequested;
};
+
+using LoadBitmapFunction = bool( * )( const Dali::ImageLoader::Input& input, Dali::Devel::PixelBuffer& pixelData );
+using LoadBitmapHeaderFunction = bool( * )( const Dali::ImageLoader::Input& input, unsigned int& width, unsigned int& height );
+
+/**
+ * Stores the magic bytes, and the loader and header functions used for each image loader.
+ */
+struct BitmapLoader
+{
+ unsigned char magicByte1; ///< The first byte in the file should be this
+ unsigned char magicByte2; ///< The second byte in the file should be this
+ LoadBitmapFunction loader; ///< The function which decodes the file
+ LoadBitmapHeaderFunction header; ///< The function which decodes the header of the file
+ Dali::Integration::Bitmap::Profile profile; ///< The kind of bitmap to be created
+ /// (addressable packed pixels or an opaque compressed blob).
+};
+
} // ImageLoader
-} // TizenPlatform
} // Dali
#endif // __DALI_TIZEN_PLATFORM_IMAGE_LOADER_INPUT_H__
--- /dev/null
+#ifndef __DALI_IMAGE_LOADING_PLUGIN_H__
+#define __DALI_IMAGE_LOADING_PLUGIN_H__
+
+/*
+ * Copyright (c) 2018 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/image-loader-input.h>
+
+namespace Dali
+{
+
+/**
+ * @brief
+ */
+class ImageLoaderPlugin
+{
+public:
+
+ /**
+ * @brief Constructor.
+ */
+ ImageLoaderPlugin(){}
+
+ /**
+ * @brief Destructor.
+ */
+ virtual ~ImageLoaderPlugin(){}
+
+ /**
+ * @brief Get the image decorder
+ * @param[in] filename The path to the resource.
+ * @return BitmapLoader
+ */
+ virtual const ImageLoader::BitmapLoader* BitmapLoaderLookup( const std::string& filename ) const = 0;
+
+ /**
+ * @brief Function pointer called in adaptor to create a image loading plugin instance.
+ * @return Pointer to the newly created plugin object
+ */
+ typedef ImageLoaderPlugin* CreateImageLoaderPlugin( void );
+
+ /**
+ * @brief Function pointer called in adaptor to destory a image loading plugin instance.
+ */
+ typedef void DestroyImageLoaderPlugin( ImageLoaderPlugin* plugin );
+
+};
+
+} // namespace Dali;
+
+#endif
$(adaptor_devel_api_dir)/adaptor-framework/feedback-plugin.h \
$(adaptor_devel_api_dir)/adaptor-framework/feedback-player.h \
$(adaptor_devel_api_dir)/adaptor-framework/file-loader.h \
+ $(adaptor_devel_api_dir)/adaptor-framework/image-loader-input.h \
+ $(adaptor_devel_api_dir)/adaptor-framework/image-loader-plugin.h \
$(adaptor_devel_api_dir)/adaptor-framework/image-loading.h \
$(adaptor_devel_api_dir)/adaptor-framework/gif-loading.h \
$(adaptor_devel_api_dir)/adaptor-framework/input-method-context.h \
#include <dali/devel-api/adaptor-framework/image-loading.h>
#include <dali/internal/system/common/locale-utils.h>
+#include <dali/internal/imaging/common/image-loader-plugin-proxy.h>
using Dali::TextAbstraction::FontClient;
ProcessCoreEvents(); // Ensure any startup messages are processed.
+ // Initialize the image loader plugin
+ Internal::Adaptor::ImageLoaderPluginProxy::Initialize();
+
for ( ObserverContainer::iterator iter = mObservers.begin(), endIter = mObservers.end(); iter != endIter; ++iter )
{
(*iter)->OnStart();
}
}
+ // Destroy the image loader plugin
+ Internal::Adaptor::ImageLoaderPluginProxy::Destroy();
+
delete mEventHandler;
mEventHandler = NULL;
--- /dev/null
+/*
+ * Copyright (c) 2018 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali/internal/imaging/common/image-loader-plugin-proxy.h>
+
+// EXTERNAL INCLUDES
+#include <dlfcn.h>
+#include <dali/integration-api/debug.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+namespace ImageLoaderPluginProxy
+{
+
+
+static const char * DEFAULT_OBJECT_NAME( "libdali-image-loader-plugin.so" );
+
+static bool mInitializeAttempted = false;
+static void* mLibHandle = NULL;
+static CreateImageLoaderPlugin* mCreatePluginFunctionPtr = NULL;
+static DestroyImageLoaderPlugin* mDestroyImageLoaderPluginPtr = NULL;
+static Dali::ImageLoaderPlugin* mImageLoaderPlugin = NULL;
+
+void Initialize()
+{
+ // Only attempt to load dll once
+ char* error = NULL;
+ if ( !mInitializeAttempted )
+ {
+ mInitializeAttempted = true;
+ mLibHandle = dlopen( DEFAULT_OBJECT_NAME, RTLD_LAZY );
+ error = dlerror();
+ if( !mLibHandle )
+ {
+ DALI_LOG_ERROR( "Cannot load dali image loading plugin library error: %s\n", error );
+ return;
+ }
+
+ // load plugin
+ mCreatePluginFunctionPtr = reinterpret_cast<CreateImageLoaderPlugin*>( dlsym( mLibHandle, "CreateImageLoaderPlugin" ) );
+ error = dlerror();
+ if( !mCreatePluginFunctionPtr )
+ {
+ DALI_LOG_ERROR("Cannot load symbol CreateImageLoaderPlugin(): %s\n", error );
+ return;
+ }
+
+ mDestroyImageLoaderPluginPtr = reinterpret_cast<DestroyImageLoaderPlugin*>( dlsym( mLibHandle, "DestroyImageLoaderPlugin" ) );
+ error = dlerror();
+ if( !mDestroyImageLoaderPluginPtr )
+ {
+ DALI_LOG_ERROR("Cannot load symbol DestroyImageLoaderPlugin(): %s\n", error );
+ return;
+ }
+
+
+ mImageLoaderPlugin = mCreatePluginFunctionPtr();
+ error = dlerror();
+ if( !mImageLoaderPlugin )
+ {
+ DALI_LOG_ERROR("Call to function CreateImageLoaderPlugin() failed : %s\n", error );
+ return;
+ }
+ }
+}
+
+void Destroy()
+{
+ if( mImageLoaderPlugin && mDestroyImageLoaderPluginPtr )
+ {
+ mDestroyImageLoaderPluginPtr( mImageLoaderPlugin );
+ mImageLoaderPlugin = NULL;
+ }
+}
+
+const ImageLoader::BitmapLoader* BitmapLoaderLookup( const std::string& filename )
+{
+ if( mImageLoaderPlugin )
+ {
+ const ImageLoader::BitmapLoader* data = mImageLoaderPlugin->BitmapLoaderLookup( filename );
+ return data;
+ }
+ return NULL;
+}
+
+} // namespace ImageLoaderPluginProxy
+
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
--- /dev/null
+#ifndef DALI_INTERNAL_IMAGE_LOADING_PLUGIN_PROXY_H
+#define DALI_INTERNAL_IMAGE_LOADING_PLUGIN_PROXY_H
+
+/*
+ * Copyright (c) 2018 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <string>
+
+// INTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/image-loader-plugin.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+namespace ImageLoaderPluginProxy
+{
+
+ using CreateImageLoaderPlugin = Dali::ImageLoaderPlugin::CreateImageLoaderPlugin;
+ using DestroyImageLoaderPlugin = Dali::ImageLoaderPlugin::DestroyImageLoaderPlugin;
+
+
+ /**
+ * @brief Initialize
+ */
+ void Initialize();
+
+
+ /**
+ * @brief Destroy
+ */
+ void Destroy();
+
+ /**
+ * @brief BitmapLoaderLookup
+ */
+ const ImageLoader::BitmapLoader* BitmapLoaderLookup( const std::string& filename );
+
+
+} // namespace ImageLoaderPluginProxy
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
+
+#endif // DALI_INTERNAL_IMAGE_LOADING_PLUGIN_PROXY_H
#include <dali/internal/imaging/common/loader-png.h>
#include <dali/internal/imaging/common/loader-wbmp.h>
#include <dali/internal/imaging/common/image-operations.h>
-#include <dali/internal/imaging/common/image-loader-input.h>
+#include <dali/devel-api/adaptor-framework/image-loader-input.h>
+#include <dali/internal/imaging/common/image-loader-plugin-proxy.h>
#include <dali/internal/system/common/file-reader.h>
using namespace Dali::Integration;
namespace
{
-typedef bool (*LoadBitmapFunction)( const ImageLoader::Input& input, Dali::Devel::PixelBuffer& pixelData );
-typedef bool (*LoadBitmapHeaderFunction)( const ImageLoader::Input& input, unsigned int& width, unsigned int& height );
-
#if defined(DEBUG_ENABLED)
Integration::Log::Filter* gLogFilter = Debug::Filter::New( Debug::Concise, false, "LOG_IMAGE_LOADING" );
#endif
-/**
- * Stores the magic bytes, and the loader and header functions used for each image loader.
- */
-struct BitmapLoader
-{
- unsigned char magicByte1; ///< The first byte in the file should be this
- unsigned char magicByte2; ///< The second byte in the file should be this
- LoadBitmapFunction loader; ///< The function which decodes the file
- LoadBitmapHeaderFunction header; ///< The function which decodes the header of the file
- Bitmap::Profile profile; ///< The kind of bitmap to be created
- /// (addressable packed pixels or an opaque compressed blob).
-};
/**
* Enum for file formats, has to be in sync with BITMAP_LOADER_LOOKUP_TABLE
* A lookup table containing all the bitmap loaders with the appropriate information.
* Has to be in sync with enum FileFormats
*/
-const BitmapLoader BITMAP_LOADER_LOOKUP_TABLE[FORMAT_TOTAL_COUNT] =
+const Dali::ImageLoader::BitmapLoader BITMAP_LOADER_LOOKUP_TABLE[FORMAT_TOTAL_COUNT] =
{
{ Png::MAGIC_BYTE_1, Png::MAGIC_BYTE_2, LoadBitmapFromPng, LoadPngHeader, Bitmap::BITMAP_2D_PACKED_PIXELS },
{ Jpeg::MAGIC_BYTE_1, Jpeg::MAGIC_BYTE_2, LoadBitmapFromJpeg, LoadJpegHeader, Bitmap::BITMAP_2D_PACKED_PIXELS },
*/
bool GetBitmapLoaderFunctions( FILE *fp,
FileFormats format,
- LoadBitmapFunction& loader,
- LoadBitmapHeaderFunction& header,
- Bitmap::Profile& profile )
+ Dali::ImageLoader::LoadBitmapFunction& loader,
+ Dali::ImageLoader::LoadBitmapHeaderFunction& header,
+ Bitmap::Profile& profile,
+ const std::string& filename )
{
unsigned char magic[MAGIC_LENGTH];
size_t read = fread(magic, sizeof(unsigned char), MAGIC_LENGTH, fp);
}
bool loaderFound = false;
- const BitmapLoader *lookupPtr = BITMAP_LOADER_LOOKUP_TABLE;
- ImageLoader::Input defaultInput( fp );
+ const Dali::ImageLoader::BitmapLoader *lookupPtr = BITMAP_LOADER_LOOKUP_TABLE;
+ Dali::ImageLoader::Input defaultInput( fp );
+
+ // try plugin image loader
+ const Dali::ImageLoader::BitmapLoader* data = Internal::Adaptor::ImageLoaderPluginProxy::BitmapLoaderLookup( filename );
+ if( data != NULL )
+ {
+ lookupPtr = data;
+ unsigned int width = 0;
+ unsigned int height = 0;
+ loaderFound = lookupPtr->header( fp, width, height );
+ }
- // try hinted format first
- if ( format != FORMAT_UNKNOWN )
+ // try hinted format
+ if ( false == loaderFound && format != FORMAT_UNKNOWN )
{
lookupPtr = BITMAP_LOADER_LOOKUP_TABLE + format;
if ( format >= FORMAT_MAGIC_BYTE_COUNT ||
if (fp != NULL)
{
- LoadBitmapFunction function;
- LoadBitmapHeaderFunction header;
+ Dali::ImageLoader::LoadBitmapFunction function;
+ Dali::ImageLoader::LoadBitmapHeaderFunction header;
Bitmap::Profile profile;
GetFormatHint( path ),
function,
header,
- profile ) )
+ profile,
+ path ) )
{
- const ScalingParameters scalingParameters( resource.size, resource.scalingMode, resource.samplingMode );
- const ImageLoader::Input input( fp, scalingParameters, resource.orientationCorrection );
+ const Dali::ImageLoader::ScalingParameters scalingParameters( resource.size, resource.scalingMode, resource.samplingMode );
+ const Dali::ImageLoader::Input input( fp, scalingParameters, resource.orientationCorrection );
// Run the image type decoder:
result = function( input, pixelBuffer );
FILE *fp = fileReader.GetFile();
if (fp != NULL)
{
- LoadBitmapFunction loaderFunction;
- LoadBitmapHeaderFunction headerFunction;
+ Dali::ImageLoader::LoadBitmapFunction loaderFunction;
+ Dali::ImageLoader::LoadBitmapHeaderFunction headerFunction;
Bitmap::Profile profile;
if ( GetBitmapLoaderFunctions( fp,
GetFormatHint(filename),
loaderFunction,
headerFunction,
- profile ) )
+ profile,
+ filename ) )
{
- const ImageLoader::Input input( fp, ScalingParameters( size, fittingMode, samplingMode ), orientationCorrection );
+ const Dali::ImageLoader::Input input( fp, Dali::ImageLoader::ScalingParameters( size, fittingMode, samplingMode ), orientationCorrection );
const bool read_res = headerFunction( input, width, height );
if(!read_res)
FILE *fp = fileReader.GetFile();
if ( fp != NULL )
{
- LoadBitmapFunction loaderFunction;
- LoadBitmapHeaderFunction headerFunction;
+ Dali::ImageLoader::LoadBitmapFunction loaderFunction;
+ Dali::ImageLoader::LoadBitmapHeaderFunction headerFunction;
Bitmap::Profile profile;
if ( GetBitmapLoaderFunctions( fp,
FORMAT_UNKNOWN,
loaderFunction,
headerFunction,
- profile ) )
+ profile,
+ "" ) )
{
- const ImageLoader::Input input( fp, ScalingParameters( size, fittingMode, samplingMode ), orientationCorrection );
+ const Dali::ImageLoader::Input input( fp, Dali::ImageLoader::ScalingParameters( size, fittingMode, samplingMode ), orientationCorrection );
const bool read_res = headerFunction( input, width, height );
if( !read_res )
{
// File loading API entry-point:
-bool LoadAstcHeader( const ImageLoader::Input& input, unsigned int& width, unsigned int& height )
+bool LoadAstcHeader( const Dali::ImageLoader::Input& input, unsigned int& width, unsigned int& height )
{
AstcFileHeader fileHeader;
return LoadAstcHeader( input.file, width, height, fileHeader );
}
// File loading API entry-point:
-bool LoadBitmapFromAstc( const ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap )
+bool LoadBitmapFromAstc( const Dali::ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap )
{
FILE* const filePointer = input.file;
if( !filePointer )
*/
#include <cstdio>
-#include <dali/internal/imaging/common/image-loader-input.h>
+#include <dali/devel-api/adaptor-framework/image-loader-input.h>
namespace Dali
{
* @param[out] bitmap The bitmap class where the decoded image will be stored
* @return True if file loaded successfully, false otherwise
*/
-bool LoadBitmapFromAstc( const ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap );
+bool LoadBitmapFromAstc( const Dali::ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap );
/**
* Loads the header of a ASTC file and fills in the width and height appropriately.
* @param[out] height Is set with the height of the image
* @return True if the header was read successfully, false otherwise
*/
-bool LoadAstcHeader( const ImageLoader::Input& input, unsigned int& width, unsigned int& height );
+bool LoadAstcHeader( const Dali::ImageLoader::Input& input, unsigned int& width, unsigned int& height );
} // namespace TizenPlatform
} // unnamed namespace
-bool LoadBmpHeader( const ImageLoader::Input& input, unsigned int& width, unsigned int& height )
+bool LoadBmpHeader( const Dali::ImageLoader::Input& input, unsigned int& width, unsigned int& height )
{
BmpFileHeader fileHeader;
BmpInfoHeader infoHeader;
return ret;
}
-bool LoadBitmapFromBmp( const ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap )
+bool LoadBitmapFromBmp( const Dali::ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap )
{
//DALI_ASSERT_DEBUG( bitmap.GetPackedPixelsProfile() != 0 && "Need a packed pixel bitmap to load into." );
FILE* const fp = input.file;
*/
#include <cstdio>
-#include <dali/internal/imaging/common/image-loader-input.h>
+#include <dali/devel-api/adaptor-framework/image-loader-input.h>
namespace Dali
{
* @param[out] bitmap The bitmap class where the decoded image will be stored
* @return true if file decoded successfully, false otherwise
*/
-bool LoadBitmapFromBmp( const ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap );
+bool LoadBitmapFromBmp( const Dali::ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap );
/**
* Loads the header of a BMP file and fills in the width and height appropriately.
* @param[out] height Is set with the height of the image
* @return true if the file's header was read successully, false otherwise
*/
-bool LoadBmpHeader( const ImageLoader::Input& input, unsigned int& width, unsigned int& height );
+bool LoadBmpHeader( const Dali::ImageLoader::Input& input, unsigned int& width, unsigned int& height );
} // namespace TizenPlatform
} // unnamed namespace
-bool LoadGifHeader( const ImageLoader::Input& input, unsigned int& width, unsigned int& height )
+bool LoadGifHeader( const Dali::ImageLoader::Input& input, unsigned int& width, unsigned int& height )
{
GifFileType* gifInfo = NULL;
AutoCleanupGif autoCleanupGif(gifInfo);
return LoadGifHeader(fp, width, height, &gifInfo);
}
-bool LoadBitmapFromGif( const ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap )
+bool LoadBitmapFromGif( const Dali::ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap )
{
FILE* const fp = input.file;
// Load the GIF Header file.
*/
#include <cstdio>
-#include <dali/internal/imaging/common/image-loader-input.h>
+#include <dali/devel-api/adaptor-framework/image-loader-input.h>
namespace Dali
{
* @param[out] bitmap The bitmap class where the decoded image will be stored
* @return true if file decoded successfully, false otherwise
*/
-bool LoadBitmapFromGif( const ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap );
+bool LoadBitmapFromGif( const Dali::ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap );
/**
* Loads the header of a GIF file and fills in the width and height appropriately.
* @param[in/out] height Is set with the height of the image
* @return true if the file's header was read successully, false otherwise
*/
-bool LoadGifHeader( const ImageLoader::Input& input, unsigned int& width, unsigned int& height );
+bool LoadGifHeader( const Dali::ImageLoader::Input& input, unsigned int& width, unsigned int& height );
} // namespace TizenPlatform
}//unnamed namespace
-bool LoadIcoHeader( const ImageLoader::Input& input, unsigned int& width, unsigned int& height )
+bool LoadIcoHeader( const Dali::ImageLoader::Input& input, unsigned int& width, unsigned int& height )
{
IcoData chosen;
Dali::Vector<unsigned char> map;
return true;
}
-bool LoadBitmapFromIco( const ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap )
+bool LoadBitmapFromIco( const Dali::ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap )
{
IcoData chosen;
Dali::Vector<unsigned char> map;
*/
#include <cstdio>
-#include <dali/internal/imaging/common/image-loader-input.h>
+#include <dali/devel-api/adaptor-framework/image-loader-input.h>
namespace Dali
{
* @param[out] bitmap The bitmap class where the decoded image will be stored
* @return true if file decoded successfully, false otherwise
*/
-bool LoadBitmapFromIco( const ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap );
+bool LoadBitmapFromIco( const Dali::ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap );
/**
* @param[in] input Information about the input image (including file pointer)
* @param[out] height of image
* @return true if header loaded successfully, false otherwise
*/
-bool LoadIcoHeader( const ImageLoader::Input& input, unsigned int& width, unsigned int& height );
+bool LoadIcoHeader( const Dali::ImageLoader::Input& input, unsigned int& width, unsigned int& height );
}
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;
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();
#include <dali/public-api/common/dali-vector.h>
#include <dali/public-api/images/pixel.h>
#include <dali/internal/legacy/tizen/image-encoder.h>
-#include <dali/internal/imaging/common/image-loader-input.h>
+#include <dali/devel-api/adaptor-framework/image-loader-input.h>
namespace Dali
{
* @param[out] bitmap The bitmap class where the decoded image will be stored
* @return true if file decoded successfully, false otherwise
*/
-bool LoadBitmapFromJpeg( const ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap );
+bool LoadBitmapFromJpeg( const Dali::ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap );
/**
* Loads the header of a JPEG file and fills in the width and height appropriately.
* @param[in/out] height Is set with the height of the image
* @return true if the file's header was read successully, false otherwise
*/
-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 );
/**
* Encode raw pixel data to JPEG format.
} // unnamed namespace
// File loading API entry-point:
-bool LoadKtxHeader( const ImageLoader::Input& input, unsigned int& width, unsigned int& height )
+bool LoadKtxHeader( const Dali::ImageLoader::Input& input, unsigned int& width, unsigned int& height )
{
KtxFileHeader fileHeader;
FILE* const fp = input.file;
}
// File loading API entry-point:
-bool LoadBitmapFromKtx( const ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap )
+bool LoadBitmapFromKtx( const Dali::ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap )
{
DALI_COMPILE_TIME_ASSERT( sizeof(Byte) == 1);
DALI_COMPILE_TIME_ASSERT( sizeof(uint32_t) == 4);
*/
#include <cstdio>
-#include <dali/internal/imaging/common/image-loader-input.h>
+#include <dali/devel-api/adaptor-framework/image-loader-input.h>
namespace Dali
{
* @param[out] bitmap The bitmap class where the decoded image will be stored
* @return true if file loaded successfully, false otherwise
*/
-bool LoadBitmapFromKtx( const ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap );
+bool LoadBitmapFromKtx( const Dali::ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap );
/**
* Loads the header of a KTX file and fills in the width and height appropriately.
* @param[out] height Is set with the height of the image
* @return true if the file's header was read successully, false otherwise
*/
-bool LoadKtxHeader( const ImageLoader::Input& input, unsigned int& width, unsigned int& height );
+bool LoadKtxHeader( const Dali::ImageLoader::Input& input, unsigned int& width, unsigned int& height );
} // namespace TizenPlatform
} // namespace - anonymous
-bool LoadPngHeader( const ImageLoader::Input& input, unsigned int& width, unsigned int& height )
+bool LoadPngHeader( const Dali::ImageLoader::Input& input, unsigned int& width, unsigned int& height )
{
png_structp png = NULL;
png_infop info = NULL;
return success;
}
-bool LoadBitmapFromPng( const ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap )
+bool LoadBitmapFromPng( const Dali::ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap )
{
png_structp png = NULL;
png_infop info = NULL;
#include <dali/public-api/common/dali-vector.h>
#include <dali/public-api/images/pixel.h>
#include <dali/internal/legacy/tizen/image-encoder.h>
-#include <dali/internal/imaging/common/image-loader-input.h>
+#include <dali/devel-api/adaptor-framework/image-loader-input.h>
namespace Dali
{
* @param[out] bitmap The bitmap class where the decoded image will be stored
* @return true if file decoded successfully, false otherwise
*/
-bool LoadBitmapFromPng( const ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap );
+bool LoadBitmapFromPng( const Dali::ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap );
/**
* Loads the header of a PNG file and fills in the width and height appropriately.
* @param[out] height Is set with the height of the image
* @return true if the file's header was read successully, false otherwise
*/
-bool LoadPngHeader( const ImageLoader::Input& input, unsigned int& width, unsigned int& height );
+bool LoadPngHeader( const Dali::ImageLoader::Input& input, unsigned int& width, unsigned int& height );
/**
* Encode raw pixel data to PNG format.
}// end unnamed namespace
-bool LoadBitmapFromWbmp( const ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap )
+bool LoadBitmapFromWbmp( const Dali::ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap )
{
FILE* const fp = input.file;
if(fp == NULL)
}
-bool LoadWbmpHeader( const ImageLoader::Input& input, unsigned int& width, unsigned int& height )
+bool LoadWbmpHeader( const Dali::ImageLoader::Input& input, unsigned int& width, unsigned int& height )
{
FILE* const fp = input.file;
if(fp == NULL)
*/
#include <cstdio>
-#include <dali/internal/imaging/common/image-loader-input.h>
+#include <dali/devel-api/adaptor-framework/image-loader-input.h>
namespace Dali
{
* @param[out] bitmap The bitmap class where the decoded image will be stored
* @return true if file decoded successfully, false otherwise
*/
-bool LoadBitmapFromWbmp( const ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap );
+bool LoadBitmapFromWbmp( const Dali::ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap );
/**
* @param[in] input Information about the input image (including file pointer)
* @param[out] height of image
* @return true if header loaded successfully, false otherwise
*/
-bool LoadWbmpHeader( const ImageLoader::Input& input, unsigned int& width, unsigned int& height );
+bool LoadWbmpHeader( const Dali::ImageLoader::Input& input, unsigned int& width, unsigned int& height );
}
${adaptor_imaging_dir}/common/gaussian-blur.cpp \
${adaptor_imaging_dir}/common/http-utils.cpp \
${adaptor_imaging_dir}/common/image-loader.cpp \
+ ${adaptor_imaging_dir}/common/image-loader-plugin-proxy.cpp \
${adaptor_imaging_dir}/common/image-operations.cpp \
${adaptor_imaging_dir}/common/loader-astc.cpp \
${adaptor_imaging_dir}/common/loader-bmp.cpp \