+/** Set a new image on the frame.
+ *
+ * \public \memberof mlt_frame_s
+ * \param self a frame
+ * \param image a pointer to the raw image data
+ * \param size the size of the image data in bytes (optional)
+ * \param destroy a function to deallocate \p image when the frame is closed (optional)
+ * \return true if error
+ */
+
+int mlt_frame_set_image( mlt_frame self, uint8_t *image, int size, mlt_destructor destroy )
+{
+ return mlt_properties_set_data( MLT_FRAME_PROPERTIES( self ), "image", image, size, destroy, NULL );
+}
+
+/** Set a new alpha channel on the frame.
+ *
+ * \public \memberof mlt_frame_s
+ * \param self a frame
+ * \param alpha a pointer to the alpha channel
+ * \param size the size of the alpha channel in bytes (optional)
+ * \param destroy a function to deallocate \p alpha when the frame is closed (optional)
+ * \return true if error
+ */
+
+int mlt_frame_set_alpha( mlt_frame self, uint8_t *alpha, int size, mlt_destructor destroy )
+{
+ self->get_alpha_mask = NULL;
+ return mlt_properties_set_data( MLT_FRAME_PROPERTIES( self ), "alpha", alpha, size, destroy, NULL );
+}
+
+/** Replace image stack with the information provided.
+ *
+ * This might prove to be unreliable and restrictive - the idea is that a transition
+ * which normally uses two images may decide to only use the b frame (ie: in the case
+ * of a composite where the b frame completely obscures the a frame).
+ *
+ * The image must be writable and the destructor for the image itself must be taken
+ * care of on another frame and that frame cannot have a replace applied to it...
+ * Further it assumes that no alpha mask is in use.
+ *
+ * For these reasons, it can only be used in a specific situation - when you have
+ * multiple tracks each with their own transition and these transitions are applied
+ * in a strictly reversed order (ie: highest numbered [lowest track] is processed
+ * first).
+ *
+ * More reliable approach - the cases should be detected during the process phase
+ * and the upper tracks should simply not be invited to stack...
+ *
+ * \public \memberof mlt_frame_s
+ * \param self a frame
+ * \param image a new image
+ * \param format the image format
+ * \param width the width of the new image
+ * \param height the height of the new image
+ */
+
+void mlt_frame_replace_image( mlt_frame self, uint8_t *image, mlt_image_format format, int width, int height )
+{
+ // Remove all items from the stack
+ while( mlt_deque_pop_back( self->stack_image ) ) ;
+
+ // Update the information
+ mlt_properties_set_data( MLT_FRAME_PROPERTIES( self ), "image", image, 0, NULL, NULL );
+ mlt_properties_set_int( MLT_FRAME_PROPERTIES( self ), "width", width );
+ mlt_properties_set_int( MLT_FRAME_PROPERTIES( self ), "height", height );
+ mlt_properties_set_int( MLT_FRAME_PROPERTIES( self ), "format", format );
+ self->get_alpha_mask = NULL;
+}
+
+/** Get the short name for an image format.
+ *
+ * \public \memberof mlt_frame_s
+ * \param format the image format
+ * \return a string
+ */
+
+const char * mlt_image_format_name( mlt_image_format format )
+{
+ switch ( format )