[Kdenlive-devel] [Mlt-devel] Qt based text producer

Marco Gittler g.marco at freenet.de
Fri Jul 10 13:54:27 UTC 2009


Am 06.01.2009 um 19:43 schrieb j-b-m:

>
>> On Sat, Jan 3, 2009 at 12:49 PM, j-b-m <j-b- 
>> m at users.sourceforge.net> wrote:
>>> I would like to add a Qt based text producer to MLT. The idea is to
>>> somehow copy the code from the qimage producer, but instead of  
>>> loading an
>>> image, we would write text on that image using the Qt classes. The  
>>> result
>>> will be something like the pango producer, but I think that with  
>>> Qt we
>>> should be able
>
> After some quick tests, it seems like this is sadly not possible.  
> Drawing text
> over a QImage requires a QApplication to be created (because some  
> stuff needs
> to be initialized), and creating it in an MLT module does not seem  
> possible...
>
> So I will stop working on that for now, unless someone with a good  
> knowledge
> of Qt4 can find another way to solve that problem...
i tested this shortly.
this small sample here can write to QImage without QApplication, (uses  
QCoreApplication) and does not need QtGui

#include <QCoreApplication>
#include <QImage>
#include <QPainter>

int main(int argc, char** argv)
{
    QCoreApplication app(argc, argv);
    QImage image(200, 200, QImage::Format_ARGB32);
    QPainter painter(&image);
    painter.drawText(100, 100, "Test");
    image.save("test.png");
    return 0;
}

with that and the code fro kdenlive for the titler, we sould be able  
to move the code into mlt.
this should let us create then also scrolling titles. (zooming,  
scrolling ...)

regards marco
>
>> Are you using pango now for the titler? I did not get that  
>> impression.
>> I don't see how you would be integrating all that you have in the
>> titler with producer_pango?!
>
> No, currently, the kdenlive titler created png images, so titles in  
> Kdenlive
> are just images.
>
> regards
> jb
>
>
> ------------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It is the best place to buy or sell services for
> just about anything Open Source.
> http://p.sf.net/sfu/Xq1LFB
> _______________________________________________
> Mlt-devel mailing list
> Mlt-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mlt-devel
>





More information about the Kdenlive mailing list