+ Bitmap::Profile profile{Bitmap::Profile::BITMAP_2D_PACKED_PIXELS};
+
+ // For backward compatibility the Bitmap must be created
+ auto retval = Bitmap::New(profile, Dali::ResourcePolicy::OWNED_DISCARD);
+
+ DALI_LOG_SET_OBJECT_STRING( retval, path );
+
+ retval->GetPackedPixelsProfile()->ReserveBuffer(
+ bitmap.GetPixelFormat(),
+ bitmap.GetWidth(),
+ bitmap.GetHeight(),
+ bitmap.GetWidth(),
+ bitmap.GetHeight()
+ );
+
+ auto& impl = Dali::GetImplementation(bitmap);
+
+ std::copy( impl.GetBuffer(), impl.GetBuffer()+impl.GetBufferSize(), retval->GetBuffer());
+ result.Reset(retval);