g_mutex.unlock();
//must be extracted from kdenlive title
- QImage *img = new QImage( width,height,QImage::Format_ARGB32 );
- img->fill( 0 );
+ QImage img( width, height, QImage::Format_ARGB32 );
+ img.fill( 0 );
QPainter p1;
- p1.begin( img );
+ p1.begin( &img );
p1.setRenderHints( QPainter::Antialiasing | QPainter::TextAntialiasing | QPainter::HighQualityAntialiasing );
//| QPainter::SmoothPixmapTransform );
scene->render( &p1, r1, r2 );
}
p1.end();
- uint8_t *pointer=img->bits();
+ uint8_t *pointer=img.bits();
QRgb* src = ( QRgb* ) pointer;
for ( int i = 0; i < width * height * 4; i += 4 )
{
*buffer++=qAlpha( *src );
src++;
}
- delete img;
}
void loadFromXml( mlt_producer producer, QGraphicsScene *scene, const char *templateXml, const char *templateText )
scene->clear();
mlt_properties producer_props = MLT_PRODUCER_PROPERTIES( producer );
QDomDocument doc;
- QString data(templateXml);
- QString replacementText(templateText);
+ QString data = QString::fromUtf8(templateXml);
+ QString replacementText = QString::fromUtf8(templateText);
doc.setContent(data);
QDomNodeList titles = doc.elementsByTagName( "kdenlivetitle" );
int maxZValue = 0;
/* Obtain properties of producer */
mlt_properties producer_props = MLT_PRODUCER_PROPERTIES( producer );
+ *width = mlt_properties_get_int( properties, "rescale_width" );
+ *height = mlt_properties_get_int( properties, "rescale_height" );
+
/* Allocate the image */
int size = *width * ( *height ) * 4;
mlt_properties_set_int( properties, "width", *width );
mlt_properties_set_int( properties, "height", *height );
-
-
/* cache later ?? */
if ( 1 )